#include "../Core/OpCode.h"


void InitOpCode_0x0_0x3(){

	//////////////////////////////////////////////////
	//		ADD [BX], AL~DL\AH~DH  
	//		ADD [BX+IMM8], AL~DL\AH~DH  
	//		ADD [BX+IMM16], AL~DL\AH~DH    
	//		ADD [BX+SI/DI], AL~DL\AH~DH   
	//		ADD [BX+SI/DI+IMM8], AL~DL\AH~DH    
	//		ADD [BX+SI/DI+IMM16], AL~DL\AH~DH    
	//////////////////////////////////////////////////
	BindOpCodeCall(0x00){
		BYTE byte = GetByteByIP(Mem, CS, IP);
		BYTE* mem_result = 0; // 指向内存地址，如[bx]



		/************************ ADD [BX], AL~DL ************************/
		mem_result = VMtoRM(Mem, reg->DS, reg->BX);
		switch(byte)
		{
			///////////////////////// ADD [BX], AL /////////////////////////
			case 0x07:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetAL());
				}, 
				{
					re->string = "ADD [BX], AL";
				})
			///////////////////////// ADD [BX], BL /////////////////////////
			case 0x1F:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetBL());
				}, 
				{
					re->string = "ADD [BX], BL";
				})
			///////////////////////// ADD [BX], CL /////////////////////////
			case 0x0F:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetCL());
				}, 
				{
					re->string = "ADD [BX], CL";
				})
			///////////////////////// ADD [BX], DL /////////////////////////
			case 0x17:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetDL());
				}, 
				{
					re->string = "ADD [BX], DL";
				})
		}	
		/************************ ADD [BX], AH~DH ************************/
		switch(byte)
		{
			///////////////////////// ADD [BX], AH /////////////////////////
			case 0x27:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetAH());
				}, 
				{
					re->string = "ADD [BX], AH";
				})
			///////////////////////// ADD [BX], BH /////////////////////////
			case 0x3F:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetBH());
				}, 
				{
					re->string = "ADD [BX], BH";
				})
			///////////////////////// ADD [BX], CH /////////////////////////
			case 0x2F:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetCH());
				}, 
				{
					re->string = "ADD [BX], CH";
				})
			///////////////////////// ADD [BX], DH /////////////////////////
			case 0x37:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetDH());
				}, 
				{
					re->string = "ADD [BX], DH";
				})
		}
	


		/************************ ADD [BX+SI], AL~DL ************************/
		mem_result = VMtoRM(Mem, reg->DS, reg->BX+reg->SI);
		switch(byte)
		{
			///////////////////////// ADD [BX+SI], AL /////////////////////////
			case 0x00:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetAL());
				},
				{
					re->string = "ADD [BX+SI], AL";
				})
			///////////////////////// ADD [BX+SI], BL /////////////////////////
			case 0x18:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetBL());
				},
				{
					re->string = "ADD [BX+SI], BL";
				})
			///////////////////////// ADD [BX+SI], CL /////////////////////////
			case 0x08:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetCL());
				},
				{
					re->string = "ADD [BX+SI], CL";
				})
			///////////////////////// ADD [BX+SI], DL /////////////////////////
			case 0x10:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetDL());
				},
				{
					re->string = "ADD [BX+SI], DL";
				})
		}
		/************************ ADD [BX+SI], AH~DH ************************/
		switch(byte)
		{
			///////////////////////// ADD [BX+SI], AH /////////////////////////
			case 0x20:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetAH());
				},
				{
					re->string = "ADD [BX+SI], AH";
				})
			///////////////////////// ADD [BX+SI], BH /////////////////////////
			case 0x38:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetBH());
				},
				{
					re->string = "ADD [BX+SI], BH";
				})
			///////////////////////// ADD [BX+SI], CH /////////////////////////
			case 0x28:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetCH());
				},
				{
					re->string = "ADD [BX+SI], CH";
				})
			///////////////////////// ADD [BX+SI], DH /////////////////////////
			case 0x30:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetDH());
				},
				{
					re->string = "ADD [BX+SI], DH";
				})
		}
		


		/************************ ADD [BX+DI], AL~DL ************************/
		mem_result = VMtoRM(Mem, reg->DS, reg->BX+reg->DI);
		switch(byte)
		{
			///////////////////////// ADD [BX+DI], AL /////////////////////////
			case 0x01:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetAL());
				},
				{
					re->string = "ADD [BX+DI], AL";
				})
			///////////////////////// ADD [BX+DI], BL /////////////////////////
			case 0x19:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetBL());
				},
				{
					re->string = "ADD [BX+DI], BL";
				})
			///////////////////////// ADD [BX+DI], CL /////////////////////////
			case 0x09:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetCL());
				},
				{
					re->string = "ADD [BX+DI], CL";
				})
			///////////////////////// ADD [BX+DI], DL /////////////////////////
			case 0x11:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetDL());
				},
				{
					re->string = "ADD [BX+DI], DL";
				})
		}
		/************************ ADD [BX+DI], AH~DH ************************/
		switch(byte)
		{
			///////////////////////// ADD [BX+DI], AH /////////////////////////
			case 0x21:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetAH());
				},
				{
					re->string = "ADD [BX+DI], AH";
				})
			///////////////////////// ADD [BX+DI], BH /////////////////////////
			case 0x39:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetBH());
				},
				{
					re->string = "ADD [BX+DI], BH";
				})
			///////////////////////// ADD [BX+DI], CH /////////////////////////
			case 0x29:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetCH());
				},
				{
					re->string = "ADD [BX+DI], CH";
				})
			///////////////////////// ADD [BX+DI], DH /////////////////////////
			case 0x31:
				OP_CODE_2({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetDH());
				},
				{
					re->string = "ADD [BX+DI], DH";
				})
		}



		BYTE low = GetByteByIP(Mem, CS, IP);
		/************************ ADD [BX+IMM8], AL~DL ************************/
		mem_result = VMtoRM(Mem, reg->DS, reg->BX+low);
		switch(byte)
		{
			///////////////////////// ADD [BX+IMM8], AL /////////////////////////
			case 0x47:
				OP_CODE_3({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetAL());
				}, 
				{
					re->string = "ADD [BX+" + ByteToHexStr(low) +"], AL";
				})
			///////////////////////// ADD [BX+IMM8], BL /////////////////////////
			case 0x5F:
				OP_CODE_3({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetBL());
				}, 
				{
					re->string = "ADD [BX+" + ByteToHexStr(low) +"], BL";
				})
			///////////////////////// ADD [BX+IMM8], CL /////////////////////////
			case 0x4F:
				OP_CODE_3({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetCL());
				}, 
				{
					re->string = "ADD [BX+" + ByteToHexStr(low) +"], CL";
				})
			///////////////////////// ADD [BX+IMM8], DL /////////////////////////
			case 0x57:
				OP_CODE_3({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetDL());
				}, 
				{
					re->string = "ADD [BX+" + ByteToHexStr(low) +"], DL";
				})
		}
		/************************ ADD [BX+IMM8], AH~DH ************************/
		switch(byte)
		{
			///////////////////////// ADD [BX+IMM8], AH /////////////////////////
			case 0x67:
				OP_CODE_3({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetAH());
				}, 
				{
					re->string = "ADD [BX+" + ByteToHexStr(low) +"], AH";
				})
			///////////////////////// ADD [BX+IMM8], BH /////////////////////////
			case 0x7F:
				OP_CODE_3({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetBH());
				}, 
				{
					re->string = "ADD [BX+" + ByteToHexStr(low) +"], BH";
				})
			///////////////////////// ADD [BX+IMM8], CH /////////////////////////
			case 0x6F:
				OP_CODE_3({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetCH());
				}, 
				{
					re->string = "ADD [BX+" + ByteToHexStr(low) +"], CH";
				})
			///////////////////////// ADD [BX+IMM8], DH /////////////////////////
			case 0x77:
				OP_CODE_3({
					 *mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetDH());
				}, 
				{
					re->string = "ADD [BX+" + ByteToHexStr(low) +"], DH";
				})
		}


				
		/************************ ADD [BX+SI+IMM8], AL~DL ************************/
		mem_result = VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low);
		switch(byte)
		{
			///////////////////////// ADD [BX+SI+IMM8], AL /////////////////////////
			case 0x40:
				OP_CODE_3({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetAL());
				},
				{
					re->string = "ADD [BX+SI+" + ByteToHexStr(low) +"], AL";
				})
			///////////////////////// ADD [BX+SI+IMM8], BL /////////////////////////
			case 0x58:
				OP_CODE_3({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetBL());
				},
				{
					re->string = "ADD [BX+SI+" + ByteToHexStr(low) +"], BL";
				})
			///////////////////////// ADD [BX+SI+IMM8], CL /////////////////////////
			case 0x48:
				OP_CODE_3({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetCL());
				},
				{
					re->string = "ADD [BX+SI+" + ByteToHexStr(low) +"], CL";
				})
			///////////////////////// ADD [BX+SI+IMM8], DL /////////////////////////
			case 0x50:
				OP_CODE_3({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetDL());
				},
				{
					re->string = "ADD [BX+SI+" + ByteToHexStr(low) +"], DL";
				})
		}
		/************************ ADD [BX+SI+IMM8], AH~DH ************************/
		switch(byte)
		{
			///////////////////////// ADD [BX+SI+IMM8], AH /////////////////////////
			case 0x60:
				OP_CODE_3({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetAH());
				},
				{
					re->string = "ADD [BX+SI+" + ByteToHexStr(low) +"], AH";
				})
			///////////////////////// ADD [BX+SI+IMM8], BH /////////////////////////
			case 0x78:
				OP_CODE_3({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetBH());
				},
				{
					re->string = "ADD [BX+SI+" + ByteToHexStr(low) +"], BH";
				})
			///////////////////////// ADD [BX+SI+IMM8], CH /////////////////////////
			case 0x68:
				OP_CODE_3({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetCH());
				},
				{
					re->string = "ADD [BX+SI+" + ByteToHexStr(low) +"], CH";
				})
			///////////////////////// ADD [BX+SI+IMM8], DH /////////////////////////
			case 0x70:
				OP_CODE_3({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetDH());
				},
				{
					re->string = "ADD [BX+SI+" + ByteToHexStr(low) +"], DH";
				})
		}
		


		/************************ ADD [BX+DI+IMM8], AL~DL ************************/
		mem_result = VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low);
		switch(byte)
		{
			///////////////////////// ADD [BX+DI+IMM8], AL /////////////////////////
			case 0x41:
				OP_CODE_3({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetAL());
				},
				{
					re->string = "ADD [BX+DI+" + ByteToHexStr(low) +"], AL";
				})
			///////////////////////// ADD [BX+DI+IMM8], BL /////////////////////////
			case 0x59:
				OP_CODE_3({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetBL());
				},
				{
					re->string = "ADD [BX+DI+" + ByteToHexStr(low) +"], BL";
				})
			///////////////////////// ADD [BX+DI+IMM8], CL /////////////////////////
			case 0x49:
				OP_CODE_3({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetCL());
				},
				{
					re->string = "ADD [BX+DI+" + ByteToHexStr(low) +"], CL";
				})
			///////////////////////// ADD [BX+DI+IMM8], DL /////////////////////////
			case 0x51:
				OP_CODE_3({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetDL());
				},
				{
					re->string = "ADD [BX+DI+" + ByteToHexStr(low) +"], DL";
				})
		}
		/************************ ADD [BX+DI+IMM8], AH~DH ************************/
		switch(byte)
		{
			///////////////////////// ADD [BX+DI+IMM8], AH /////////////////////////
			case 0x61:
				OP_CODE_3({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetAH());
				},
				{
					re->string = "ADD [BX+DI+" + ByteToHexStr(low) +"], AH";
				})
			///////////////////////// ADD [BX+DI+IMM8], BH /////////////////////////
			case 0x79:
				OP_CODE_3({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetBH());
				},
				{
					re->string = "ADD [BX+DI+" + ByteToHexStr(low) +"], BH";
				})
			///////////////////////// ADD [BX+DI+IMM8], CH /////////////////////////
			case 0x69:
				OP_CODE_3({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetCH());
				},
				{
					re->string = "ADD [BX+DI+" + ByteToHexStr(low) +"], CH";
				})
			///////////////////////// ADD [BX+DI+IMM8], DH /////////////////////////
			case 0x71:
				OP_CODE_3({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetDH());
				},
				{
					re->string = "ADD [BX+DI+" + ByteToHexStr(low) +"], DH";
				})
		}



		BYTE high = GetByteByIP(Mem, CS, IP);
		WORD offset = 0;
		ByteSetToWord(&offset, low, high);
		/************************ ADD [BX+IMM16], AL~DL ************************/
		mem_result = VMtoRM(Mem, reg->DS, reg->BX+offset);
		switch(byte)
		{
			///////////////////////// ADD [BX+IMM16], AL /////////////////////////
			case 0x87:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetAL());
				}, 
				{
					re->string = "ADD [BX+" + WordToHexStr(offset) +"], AL";
				})
			///////////////////////// ADD [BX+IMM16], BL /////////////////////////
			case 0x9F:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetBL());
				}, 
				{
					re->string = "ADD [BX+" + WordToHexStr(offset) +"], BL";
				})
			///////////////////////// ADD [BX+IMM16], CL /////////////////////////
			case 0x8F:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetCL());
				}, 
				{
					re->string = "ADD [BX+" + WordToHexStr(offset) +"], CL";
				})
			///////////////////////// ADD [BX+IMM16], DL /////////////////////////
			case 0x97:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetDL());
				}, 
				{
					re->string = "ADD [BX+" + WordToHexStr(offset) +"], DL";
				})
		}
		/************************ ADD [BX+IMM16], AH~DH ************************/
		switch(byte)
		{
			///////////////////////// ADD [BX+IMM16], AH /////////////////////////
			case 0xA7:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetAH());
				}, 
				{
					re->string = "ADD [BX+" + WordToHexStr(offset) +"], AH";
				})
			///////////////////////// ADD [BX+IMM16], BH /////////////////////////
			case 0xBF:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetBH());
				}, 
				{
					re->string = "ADD [BX+" + WordToHexStr(offset) +"], BH";
				})
			///////////////////////// ADD [BX+IMM16], CH /////////////////////////
			case 0xAF:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetCH());
				}, 
				{
					re->string = "ADD [BX+" + WordToHexStr(offset) +"], CH";
				})
			///////////////////////// ADD [BX+IMM16], DH /////////////////////////
			case 0xB7:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetDH());
				}, 
				{
					re->string = "ADD [BX+" + WordToHexStr(offset) +"], DH";
				})
		}
		


		/************************ ADD [BX+SI+IMM16], AL~DL ************************/
		mem_result = VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset);
		switch(byte)
		{
			///////////////////////// ADD [BX+SI+IMM16], AL /////////////////////////
			case 0x80:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetAL());
				},
				{
					re->string = "ADD [BX+SI+" + WordToHexStr(offset) +"], AL";
				})
			///////////////////////// ADD [BX+SI+IMM16], BL /////////////////////////
			case 0x98:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetBL());
				},
				{
					re->string = "ADD [BX+SI+" + WordToHexStr(offset) +"], BL";
				})
			///////////////////////// ADD [BX+SI+IMM16], CL /////////////////////////
			case 0x88:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetCL());
				},
				{
					re->string = "ADD [BX+SI+" + WordToHexStr(offset) +"], CL";
				})
			///////////////////////// ADD [BX+SI+IMM16], DL /////////////////////////
			case 0x90:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetDL());
				},
				{
					re->string = "ADD [BX+SI+" + WordToHexStr(offset) +"], DL";
				})
		}
		/************************ ADD [BX+SI+IMM16], AH~DH ************************/
		switch(byte)
		{
			///////////////////////// ADD [BX+SI+IMM16], AH /////////////////////////
			case 0xA0:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetAH());
				},
				{
					re->string = "ADD [BX+SI+" + WordToHexStr(offset) +"], AH";
				})
			///////////////////////// ADD [BX+SI+IMM16], BH /////////////////////////
			case 0xB8:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetBH());
				},
				{
					re->string = "ADD [BX+SI+" + WordToHexStr(offset) +"], BH";
				})
			///////////////////////// ADD [BX+SI+IMM16], CH /////////////////////////
			case 0xA8:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetCH());
				},
				{
					re->string = "ADD [BX+SI+" + WordToHexStr(offset) +"], CH";
				})
			///////////////////////// ADD [BX+SI+IMM16], DH /////////////////////////
			case 0xB0:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetDH());
				},
				{
					re->string = "ADD [BX+SI+" + WordToHexStr(offset) +"], DH";
				})
		}
		


		/************************ ADD [BX+DI+IMM16], AL~DL ************************/
		mem_result = VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset);
		switch(byte)
		{
			///////////////////////// ADD [BX+DI+IMM16], AL /////////////////////////
			case 0x81:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetAL());
				},
				{
					re->string = "ADD [BX+DI+" + WordToHexStr(offset) +"], AL";
				})
			///////////////////////// ADD [BX+DI+IMM16], BL /////////////////////////
			case 0x99:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetBL());
				},
				{
					re->string = "ADD [BX+DI+" + WordToHexStr(offset) +"], BL";
				})
			///////////////////////// ADD [BX+DI+IMM16], CL /////////////////////////
			case 0x89:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetCL());
				},
				{
					re->string = "ADD [BX+DI+" + WordToHexStr(offset) +"], CL";
				})
			///////////////////////// ADD [BX+DI+IMM16], DL /////////////////////////
			case 0x91:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetDL());
				},
				{
					re->string = "ADD [BX+DI+" + WordToHexStr(offset) +"], DL";
				})
		}
		/************************ ADD [BX+DI+IMM16], AH~DH ************************/
		switch(byte)
		{
			///////////////////////// ADD [BX+DI+IMM16], AH /////////////////////////
			case 0xA1:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetAH());
				},
				{
					re->string = "ADD [BX+DI+" + WordToHexStr(offset) +"], AH";
				})
			///////////////////////// ADD [BX+DI+IMM16], BH /////////////////////////
			case 0xB9:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetBH());
				},
				{
					re->string = "ADD [BX+DI+" + WordToHexStr(offset) +"], BH";
				})
			///////////////////////// ADD [BX+DI+IMM16], CH /////////////////////////
			case 0xA9:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetCH());
				},
				{
					re->string = "ADD [BX+DI+" + WordToHexStr(offset) +"], CH";
				})
			///////////////////////// ADD [BX+DI+IMM16], DH /////////////////////////
			case 0xB1:
				OP_CODE_4({
					*mem_result = FlagOperation::ADD(Mem, reg, *mem_result, reg->GetDH());
				},
				{
					re->string = "ADD [BX+DI+" + WordToHexStr(offset) +"], DH";
				})
		}
	};
	
	//////////////////////////////////////////////////
	//		ADD [BX], AX~DX   
	//		ADD [BX+IMM8], AX~DX  
	//		ADD [BX+IMM16], AX~DX  
	//		ADD [BX+SI/DI], AX~DX   
	//		ADD [BX+SI/DI+IMM8], AX~DX  
	//		ADD [BX+SI/DI+IMM16], AX~DX  
	//////////////////////////////////////////////////
	BindOpCodeCall(0x01){
		BYTE byte = GetByteByIP(Mem, CS, IP);
		WORD word = 0;


		/************************ ADD [BX], AX~DX ************************/
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX), *VMtoRM(Mem, reg->DS, reg->BX+1));
		switch(byte)
		{
			///////////////////////// ADD [BX], AX /////////////////////////
			case 0x07:
				OP_CODE_2({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->AX), VMtoRM(Mem, reg->DS, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+1));
				}, 
				{
					re->string = "ADD [BX], AX";
				})
			///////////////////////// ADD [BX], BX /////////////////////////
			case 0x1F:
				OP_CODE_2({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->BX), VMtoRM(Mem, reg->DS, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+1));
				}, 
				{
					re->string = "ADD [BX], BX";
				})
			///////////////////////// ADD [BX], CX /////////////////////////
			case 0x0F:
				OP_CODE_2({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->CX), VMtoRM(Mem, reg->DS, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+1));
				}, 
				{
					re->string = "ADD [BX], CX";
				})
			///////////////////////// ADD [BX], DX /////////////////////////
			case 0x17:
				OP_CODE_2({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->DX), VMtoRM(Mem, reg->DS, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+1));
				}, 
				{
					re->string = "ADD [BX], DX";
				})
		}
			


		/************************ ADD [BX+SI], AX~DX ************************/
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->SI), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+1));
		switch(byte)
		{
			///////////////////////// ADD [BX+SI], AX /////////////////////////
			case 0x00:
				OP_CODE_2({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->AX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+1));	
				},
				{
					re->string = "ADD [BX+SI], AX";
				})
			///////////////////////// ADD [BX+SI], BX /////////////////////////
			case 0x18:
				OP_CODE_2({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+1));	
				},
				{
					re->string = "ADD [BX+SI], BX";
				})
			///////////////////////// ADD [BX+SI], CX /////////////////////////
			case 0x08:
				OP_CODE_2({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->CX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+1));	
				},
				{
					re->string = "ADD [BX+SI], CX";
				})
			///////////////////////// ADD [BX+SI], DX /////////////////////////
			case 0x10:
				OP_CODE_2({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->DX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+1));	
				},
				{
					re->string = "ADD [BX+SI], DX";
				})
		}
		


		/************************ ADD [BX+DI], AX~DX ************************/
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->DI), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+1));
		switch(byte)
		{
			///////////////////////// ADD [BX+DI], AX /////////////////////////
			case 0x01:
				OP_CODE_2({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->AX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+1));	
				},
				{
					re->string = "ADD [BX+DI], AX";
				})
			///////////////////////// ADD [BX+DI], BX /////////////////////////
			case 0x19:
				OP_CODE_2({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+1));	
				},
				{
					re->string = "ADD [BX+DI], BX";
				})
			///////////////////////// ADD [BX+DI], CX /////////////////////////
			case 0x09:
				OP_CODE_2({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->CX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+1));	
				},
				{
					re->string = "ADD [BX+DI], CX";
				})
			///////////////////////// ADD [BX+DI], DX /////////////////////////
			case 0x11:
				OP_CODE_2({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->DX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+1));	
				},
				{
					re->string = "ADD [BX+DI], DX";
				})
		}
		


		BYTE low = GetByteByIP(Mem, CS, IP);
		/************************ ADD [BX+IMM8], AX~DX ************************/
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+low), *VMtoRM(Mem, reg->DS, reg->BX+low+1));
		switch(byte)
		{
			///////////////////////// ADD [BX+IMM8], AX /////////////////////////
			case 0x47:
				OP_CODE_3({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->AX), VMtoRM(Mem, reg->DS, reg->BX+low), VMtoRM(Mem, reg->DS, reg->BX+low+1));
				}, 
				{
					re->string = "ADD [BX+" + ByteToHexStr(low) +"], AX";
				})
			///////////////////////// ADD [BX+IMM8], BX /////////////////////////
			case 0x5F:
				OP_CODE_3({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+low), VMtoRM(Mem, reg->DS, reg->BX+low+1));
				}, 
				{
					re->string = "ADD [BX+" + ByteToHexStr(low) +"], BX";
				})
			///////////////////////// ADD [BX+IMM8], CX /////////////////////////
			case 0x4F:
				OP_CODE_3({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->CX), VMtoRM(Mem, reg->DS, reg->BX+low), VMtoRM(Mem, reg->DS, reg->BX+low+1));
				}, 
				{
					re->string = "ADD [BX+" + ByteToHexStr(low) +"], CX";
				})
			///////////////////////// ADD [BX+IMM8], DX /////////////////////////
			case 0x57:
				OP_CODE_3({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->DX), VMtoRM(Mem, reg->DS, reg->BX+low), VMtoRM(Mem, reg->DS, reg->BX+low+1));
				}, 
				{
					re->string = "ADD [BX+" + ByteToHexStr(low) +"], DX";
				})
		}
		


		/************************ ADD [BX+SI+IMM8], AX~DX ************************/
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low+1));
		switch(byte)
		{
			///////////////////////// ADD [BX+SI+IMM8], AX /////////////////////////
			case 0x40:
				OP_CODE_3({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->AX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low+1));	
				},
				{
					re->string = "ADD [BX+SI+" + ByteToHexStr(low) +"], AX";
				})
			///////////////////////// ADD [BX+SI+IMM8], BX /////////////////////////
			case 0x58:
				OP_CODE_3({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low+1));	
				},
				{
					re->string = "ADD [BX+SI+" + ByteToHexStr(low) +"], BX";
				})
			///////////////////////// ADD [BX+SI+IMM8], CX /////////////////////////
			case 0x48:
				OP_CODE_3({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->CX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low+1));	
				},
				{
					re->string = "ADD [BX+SI+" + ByteToHexStr(low) +"], CX";
				})
			///////////////////////// ADD [BX+SI+IMM8], DX /////////////////////////
			case 0x50:
				OP_CODE_3({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->DX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low+1));	
				},
				{
					re->string = "ADD [BX+SI+" + ByteToHexStr(low) +"], DX";
				})
		}
		


		/************************ ADD [BX+DI+IMM8], AX~DX ************************/
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low+1));
		switch(byte)
		{
			///////////////////////// ADD [BX+DI+IMM8], AX /////////////////////////
			case 0x41:
				OP_CODE_3({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->AX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low+1));	
				},
				{
					re->string = "ADD [BX+DI+" + ByteToHexStr(low) +"], AX";
				})
			///////////////////////// ADD [BX+DI+IMM8], BX /////////////////////////
			case 0x59:
				OP_CODE_3({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low+1));	
				},
				{
					re->string = "ADD [BX+DI+" + ByteToHexStr(low) +"], BX";
				})
			///////////////////////// ADD [BX+DI+IMM8], CX /////////////////////////
			case 0x49:
				OP_CODE_3({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->CX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low+1));	
				},
				{
					re->string = "ADD [BX+DI+" + ByteToHexStr(low) +"], CX";
				})
			///////////////////////// ADD [BX+DI+IMM8], DX /////////////////////////
			case 0x51:
				OP_CODE_3({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->DX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low+1));	
				},
				{
					re->string = "ADD [BX+DI+" + ByteToHexStr(low) +"], DX";
				})
		}
	
		

		BYTE high = GetByteByIP(Mem, CS, IP);
		WORD offset;
		ByteSetToWord(&offset, low, high);
		/************************ ADD [BX+IMM16], AX~DX ************************/
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+offset), *VMtoRM(Mem, reg->DS, reg->BX+offset+1)); // ȡ[BX+IMM16]
		switch(byte)
		{
			///////////////////////// ADD [BX+IMM16], AX /////////////////////////
			case 0x87:
				OP_CODE_4({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->AX), VMtoRM(Mem, reg->DS, reg->BX+offset), VMtoRM(Mem, reg->DS, reg->BX+offset+1));
				}, 
				{
					re->string = "ADD [BX+" + WordToHexStr(offset) +"], AX";
				})
			///////////////////////// ADD [BX+IMM16], BX /////////////////////////
			case 0x9F:
				OP_CODE_4({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+offset), VMtoRM(Mem, reg->DS, reg->BX+offset+1));
				}, 
				{
					re->string = "ADD [BX+" + WordToHexStr(offset) +"], BX";
				})
			///////////////////////// ADD [BX+IMM16], CX /////////////////////////
			case 0x8F:
				OP_CODE_4({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->CX), VMtoRM(Mem, reg->DS, reg->BX+offset), VMtoRM(Mem, reg->DS, reg->BX+offset+1));
				}, 
				{
					re->string = "ADD [BX+" + WordToHexStr(offset) +"], CX";
				})
			///////////////////////// ADD [BX+IMM16], DX /////////////////////////
			case 0x97:
				OP_CODE_4({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->DX), VMtoRM(Mem, reg->DS, reg->BX+offset), VMtoRM(Mem, reg->DS, reg->BX+offset+1));
				}, 
				{
					re->string = "ADD [BX+" + WordToHexStr(offset) +"], DX";
				})
		}
			


		/************************ ADD [BX+SI+IMM16], AX~DX ************************/
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset+1)); // ȡ[BX+SI+IMM16]
		switch(byte)
		{
			///////////////////////// ADD [BX+SI+IMM16], AX /////////////////////////
			case 0x80:
				OP_CODE_4({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->AX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset+1));	
				},
				{
					re->string = "ADD [BX+SI+" + WordToHexStr(offset) +"], AX";
				})
			///////////////////////// ADD [BX+SI+IMM16], BX /////////////////////////
			case 0x98:
				OP_CODE_4({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset+1));	
				},
				{
					re->string = "ADD [BX+SI+" + WordToHexStr(offset) +"], BX";
				})
			///////////////////////// ADD [BX+SI+IMM16], CX /////////////////////////
			case 0x88:
				OP_CODE_4({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->CX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset+1));	
				},
				{
					re->string = "ADD [BX+SI+" + WordToHexStr(offset) +"], CX";
				})
			///////////////////////// ADD [BX+SI+IMM16], DX /////////////////////////
			case 0x90:
				OP_CODE_4({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->DX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset+1));	
				},
				{
					re->string = "ADD [BX+SI+" + WordToHexStr(offset) +"], DX";
				})
		}
		


		/************************ ADD [BX+DI+IMM16], AX~DX ************************/
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset+1)); // ȡ[BX+DI+IMM16]
		switch(byte)
		{
			///////////////////////// ADD [BX+DI+IMM16], AX /////////////////////////
			case 0x81:
				OP_CODE_4({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->AX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset+1));	
				},
				{
					re->string = "ADD [BX+DI+" + WordToHexStr(offset) +"], AX";
				})
			///////////////////////// ADD [BX+DI+IMM16], BX /////////////////////////
			case 0x99:
				OP_CODE_4({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset+1));	
				},
				{
					re->string = "ADD [BX+DI+" + WordToHexStr(offset) +"], BX";
				})
			///////////////////////// ADD [BX+DI+IMM16], CX /////////////////////////
			case 0x89:
				OP_CODE_4({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->CX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset+1));	
				},
				{
					re->string = "ADD [BX+DI+" + WordToHexStr(offset) +"], CX";
				})
			///////////////////////// ADD [BX+DI+IMM16], DX /////////////////////////
			case 0x91:
				OP_CODE_4({
					WordSetToByte(FlagOperation::ADD(Mem, reg, word, reg->DX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset+1));	
				},
				{
					re->string = "ADD [BX+DI+" + WordToHexStr(offset) +"], DX";
				})
		}
	};
	
	//////////////////////////////////////////////////
	//		ADD AL~DL\AH~DH, AL~DL\AH~DH  
	//		ADD AL~DL\AH~DH, [BX]   
	//		ADD AL~DL\AH~DH, [BX+IMM8] 
	//		ADD AL~DL\AH~DH, [BX+IMM16]  
	//		ADD AL~DL\AH~DH, [BX+SI/DI]   
	//		ADD AL~DL\AH~DH, [IMM16]  
	//		ADD AL~DL\AH~DH, [BX+IMM8+SI/DI] 
	//		ADD AL~DL\AH~DH, [BX+IMM16+SI/DI]  
	//////////////////////////////////////////////////
	BindOpCodeCall(0x02){
		BYTE byte = GetByteByIP(Mem, CS, IP);



		/************************ ADD AL~DL\AH~DH, AL~DL\AH~DH ************************/
		BYTE high = GetByteHigh(byte);
		BYTE low = GetByteLow(byte);
		BYTE OpNum_2 = 0;
		std::string strOpNum_2 = "??";
		// 低位决定第二个操作数
		if (low >= 0x08) low = low - 0x08;
		switch(low)
		{
			case 0X00:
				OpNum_2 = reg->GetAL();
				strOpNum_2 = "AL";
				break;
			case 0X03:
				OpNum_2 = reg->GetBL();
				strOpNum_2 = "BL";
				break;
			case 0X01:
				OpNum_2 = reg->GetCL();
				strOpNum_2 = "CL";
				break;
			case 0X02:
				OpNum_2 = reg->GetDL();
				strOpNum_2 = "DL";
				break;
			case 0X04:
				OpNum_2 = reg->GetAH();
				strOpNum_2 = "AH";
				break;
			case 0X07:
				OpNum_2 = reg->GetBH();
				strOpNum_2 = "BH";
				break;
			case 0X05:
				OpNum_2 = reg->GetCH();
				strOpNum_2 = "CH";
				break;
			case 0X06:
				OpNum_2 = reg->GetDH();
				strOpNum_2 = "DH";
				break;
		}
		// 高位和低位的低位的第4位决定第一个操作数
		high = high + (low&0x08);
		switch(high)
		{
			case 0x0C:
				OP_CODE_2({						
					reg->SetAL(FlagOperation::ADD(Mem, reg, reg->GetAL(), OpNum_2));
				},
				{
					re->string = "ADD AL, " + strOpNum_2;
				})
			case 0x0D:
				OP_CODE_2({						
					reg->SetBL(FlagOperation::ADD(Mem, reg, reg->GetBL(), OpNum_2));
				},
				{
					re->string = "ADD BL, " + strOpNum_2;
				})
			case 0x0E:
				OP_CODE_2({						
					reg->SetAH(FlagOperation::ADD(Mem, reg, reg->GetAH(), OpNum_2));
				},
				{
					re->string = "ADD AH, " + strOpNum_2;
				})
			case 0x0F:
				OP_CODE_2({						
					reg->SetBH(FlagOperation::ADD(Mem, reg, reg->GetBH(), OpNum_2));
				},
				{
					re->string = "ADD BH, " + strOpNum_2;
				})
			case 0x14:
				OP_CODE_2({						
					reg->SetCL(FlagOperation::ADD(Mem, reg, reg->GetCL(), OpNum_2));
				},
				{
					re->string = "ADD CL, " + strOpNum_2;
				})
			case 0x15:
				OP_CODE_2({						
					reg->SetDL(FlagOperation::ADD(Mem, reg, reg->GetDL(), OpNum_2));
				},
				{
					re->string = "ADD DL, " + strOpNum_2;
				})
			case 0x16:
				OP_CODE_2({						
					reg->SetCH(FlagOperation::ADD(Mem, reg, reg->GetCH(), OpNum_2));
				},
				{
					re->string = "ADD CH, " + strOpNum_2;
				})
			case 0x17:
				OP_CODE_2({						
					reg->SetDH(FlagOperation::ADD(Mem, reg, reg->GetDH(), OpNum_2));
				},
				{
					re->string = "ADD DH, " + strOpNum_2;
				})
		}



		/************************ ADD AL~DL, [BX] ************************/
		switch(byte)
		{
			///////////////////////// ADD AL, [BX] /////////////////////////
			case 0x07:
				OP_CODE_2({				
					reg->SetAL(FlagOperation::ADD(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, reg->BX)));
				},
				{
					re->string = "ADD AL, [BX]";
				})
			///////////////////////// ADD BL, [BX] /////////////////////////
			case 0x1F:
				OP_CODE_2({
					reg->SetBL(FlagOperation::ADD(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, reg->BX)));
				},
				{
					re->string = "ADD BL, [BX]";
				})
			///////////////////////// ADD CL, [BX] /////////////////////////
			case 0x0F:
				OP_CODE_2({
					reg->SetCL(FlagOperation::ADD(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, reg->BX)));
				},
				{
					re->string = "ADD CL, [BX]";
				})
			///////////////////////// ADD DL, [BX] /////////////////////////
			case 0x17:
				OP_CODE_2({
					reg->SetDL(FlagOperation::ADD(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, reg->BX)));
				},
				{
					re->string = "ADD DL, [BX]";
				})
		}
		/************************ ADD AH~DH, [BX] ************************/
		switch(byte)
		{
			///////////////////////// ADD AH, [BX] /////////////////////////
			case 0x27:
				OP_CODE_2({
					reg->SetAH(FlagOperation::ADD(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, reg->BX)));
				},
				{
					re->string = "ADD AH, [BX]";
				})
			///////////////////////// ADD BH, [BX] /////////////////////////
			case 0x3F:
				OP_CODE_2({
					reg->SetBH(FlagOperation::ADD(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, reg->BX)));
				},
				{
					re->string = "ADD BH, [BX]";
				})
			///////////////////////// ADD CH, [BX] /////////////////////////
			case 0x2F:
				OP_CODE_2({
					reg->SetCH(FlagOperation::ADD(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, reg->BX)));
				},
				{
					re->string = "ADD CH, [BX]";
				})
			///////////////////////// ADD DH, [BX] /////////////////////////
			case 0x37:
				OP_CODE_2({
					reg->SetDH(FlagOperation::ADD(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, reg->BX)));
				},
				{
					re->string = "ADD DH, [BX]";
				})
		}
		


		/************************ ADD AL~DL, [BX+SI] ************************/
		switch(byte)
		{
			///////////////////////// ADD AL, [BX+SI] /////////////////////////
			case 0x00:
				OP_CODE_2({
					reg->SetAL(FlagOperation::ADD(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI)));
				},
				{
					re->string = "ADD AL, [BX+SI]";
				})
			///////////////////////// ADD BL, [BX+SI] /////////////////////////
			case 0x18:
				OP_CODE_2({
					reg->SetBL(FlagOperation::ADD(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI)));
				},
				{
					re->string = "ADD BL, [BX+SI]";
				})
			///////////////////////// ADD CL, [BX+SI] /////////////////////////
			case 0x08:
				OP_CODE_2({
					reg->SetCL(FlagOperation::ADD(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI)));
				},
				{
					re->string = "ADD CL, [BX+SI]";
				})
			///////////////////////// ADD DL, [BX] /////////////////////////
			case 0x10:
				OP_CODE_2({
					reg->SetDL(FlagOperation::ADD(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI)));
				},
				{
					re->string = "ADD DL, [BX+SI]";
				})
		}
		/************************ ADD AH~DH, [BX+SI] ************************/
		switch(byte)
		{
			///////////////////////// ADD AH, [BX+SI] /////////////////////////
			case 0x20:
				OP_CODE_2({
					reg->SetAH(FlagOperation::ADD(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI)));
				},
				{
					re->string = "ADD AH, [BX+SI]";
				})
			///////////////////////// ADD BH, [BX+SI] /////////////////////////
			case 0x38:
				OP_CODE_2({
					reg->SetBH(FlagOperation::ADD(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI)));
				},
				{
					re->string = "ADD BH, [BX+SI]";
				})
			///////////////////////// ADD CH, [BX+SI] /////////////////////////
			case 0x28:
				OP_CODE_2({
					reg->SetCH(FlagOperation::ADD(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI)));
				},
				{
					re->string = "ADD CH, [BX+SI]";
				})
			///////////////////////// ADD DH, [BX] /////////////////////////
			case 0x30:
				OP_CODE_2({
					reg->SetDH(FlagOperation::ADD(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI)));
				},
				{
					re->string = "ADD DH, [BX+SI]";
				})
		}
				


		/************************ ADD AL~DL, [BX+DI] ************************/
		switch(byte)
		{
			///////////////////////// ADD AL, [BX+DI] /////////////////////////
			case 0x01:
				OP_CODE_2({
					reg->SetAL(FlagOperation::ADD(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI)));
				},
				{
					re->string = "ADD AL, [BX+DI]";
				})
			///////////////////////// ADD BL, [BX+DI] /////////////////////////
			case 0x19:
				OP_CODE_2({
					reg->SetBL(FlagOperation::ADD(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI)));
				},
				{
					re->string = "ADD BL, [BX+DI]";
				})
			///////////////////////// ADD CL, [BX+DI] /////////////////////////
			case 0x09:
				OP_CODE_2({
					reg->SetCL(FlagOperation::ADD(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI)));
				},
				{
					re->string = "ADD CL, [BX+DI]";
				})
			///////////////////////// ADD DL, [BX] /////////////////////////
			case 0x11:
				OP_CODE_2({
					reg->SetDL(FlagOperation::ADD(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI)));
				},
				{
					re->string = "ADD DL, [BX+DI]";
				})
		}
		/************************ ADD AH~DH, [BX+DI] ************************/
		switch(byte)
		{
			///////////////////////// ADD AH, [BX+DI] /////////////////////////
			case 0x21:
				OP_CODE_2({
					reg->SetAH(FlagOperation::ADD(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI)));
				},
				{
					re->string = "ADD AH, [BX+DI]";
				})
			///////////////////////// ADD BH, [BX+DI] /////////////////////////
			case 0x39:
				OP_CODE_2({
					reg->SetBH(FlagOperation::ADD(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI)));
				},
				{
					re->string = "ADD BH, [BX+DI]";
				})
			///////////////////////// ADD CH, [BX+DI] /////////////////////////
			case 0x29:
				OP_CODE_2({
					reg->SetCH(FlagOperation::ADD(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI)));
				},
				{
					re->string = "ADD CH, [BX+DI]";
				})
			///////////////////////// ADD DH, [BX] /////////////////////////
			case 0x31:
				OP_CODE_2({
					reg->SetDH(FlagOperation::ADD(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI)));
				},
				{
					re->string = "ADD DH, [BX+DI]";
				})
		}


		
		low = GetByteByIP(Mem, CS, IP);
		/************************ ADD AL~DL, [BX+IMM8] ************************/
		switch(byte)
		{
			///////////////////////// ADD AL, [BX+IMM8] /////////////////////////
			case 0x47:
				OP_CODE_3({
					reg->SetAL(FlagOperation::ADD(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, reg->BX+low)));
				},
				{
					re->string = "ADD AL, [BX+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD BL, [BX+IMM8] /////////////////////////
			case 0x5F:
				OP_CODE_3({
					reg->SetBL(FlagOperation::ADD(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, reg->BX+low)));
				},
				{
					re->string = "ADD BL, [BX+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD CL, [BX+IMM8] /////////////////////////
			case 0x4F:
				OP_CODE_3({
					reg->SetCL(FlagOperation::ADD(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, reg->BX+low)));
				},
				{
					re->string = "ADD CL, [BX+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD DL, [BX+IMM8] /////////////////////////
			case 0x57:
				OP_CODE_3({
					reg->SetDL(FlagOperation::ADD(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, reg->BX+low)));
				},
				{
					re->string = "ADD DL, [BX+"+ByteToHexStr(low)+"]";
				})
		}
		/************************ ADD AH~DH, [BX+IMM8] ************************/
		switch(byte)
		{
			///////////////////////// ADD AH, [BX+IMM8] /////////////////////////
			case 0x67:
				OP_CODE_3({
					reg->SetAH(FlagOperation::ADD(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, reg->BX+low)));
				},
				{
					re->string = "ADD AH, [BX+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD BH, [BX+IMM8] /////////////////////////
			case 0x7F:
				OP_CODE_3({
					reg->SetBH(FlagOperation::ADD(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, reg->BX+low)));
				},
				{
					re->string = "ADD BH, [BX+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD CH, [BX+IMM8] /////////////////////////
			case 0x6F:
				OP_CODE_3({
					reg->SetCH(FlagOperation::ADD(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, reg->BX+low)));
				},
				{
					re->string = "ADD CH, [BX+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD DH, [BX+IMM8] /////////////////////////
			case 0x77:
				OP_CODE_3({
					reg->SetDH(FlagOperation::ADD(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, reg->BX+low)));
				},
				{
					re->string = "ADD DH, [BX+"+ByteToHexStr(low)+"]";
				})
		}
		
	

		/************************ ADD AL~DL, [BX+SI+IMM8] ************************/
		switch(byte)
		{
			///////////////////////// ADD AL, [BX+SI+IMM8] /////////////////////////
			case 0x40:
				OP_CODE_3({
					reg->SetAL(FlagOperation::ADD(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low)));
				},
				{
					re->string = "ADD AL, [BX+SI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD BL, [BX+SI+IMM8] /////////////////////////
			case 0x58:
				OP_CODE_3({
					reg->SetBL(FlagOperation::ADD(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low)));
				},
				{
					re->string = "ADD BL, [BX+SI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD CL, [BX+SI+IMM8] /////////////////////////
			case 0x48:
				OP_CODE_3({
					reg->SetCL(FlagOperation::ADD(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low)));
				},
				{
					re->string = "ADD CL, [BX+SI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD DL, [BX+SI+IMM8] /////////////////////////
			case 0x50:
				OP_CODE_3({
					reg->SetDL(FlagOperation::ADD(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low)));
				},
				{
					re->string = "ADD DL, [BX+SI+"+ByteToHexStr(low)+"]";
				})
		}
		/************************ ADD AH~DH, [BX+SI+IMM8] ************************/
		switch(byte)
		{
			///////////////////////// ADD AH, [BX+SI+IMM8] /////////////////////////
			case 0x60:
				OP_CODE_3({
					reg->SetAH(FlagOperation::ADD(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low)));
				},
				{
					re->string = "ADD AH, [BX+SI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD BH, [BX+SI+IMM8] /////////////////////////
			case 0x78:
				OP_CODE_3({
					reg->SetBH(FlagOperation::ADD(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low)));
				},
				{
					re->string = "ADD BH, [BX+SI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD CH, [BX+SI+IMM8] /////////////////////////
			case 0x68:
				OP_CODE_3({
					reg->SetCH(FlagOperation::ADD(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low)));
				},
				{
					re->string = "ADD CH, [BX+SI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD DH, [BX+SI+IMM8] /////////////////////////
			case 0x70:
				OP_CODE_3({
					reg->SetDH(FlagOperation::ADD(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low)));
				},
				{
					re->string = "ADD DH, [BX+SI+"+ByteToHexStr(low)+"]";
				})
		}
		
		

		/************************ ADD AL~DL, [BX+DI+IMM8] ************************/
		switch(byte)
		{
			///////////////////////// ADD AL, [BX+DI+IMM8] /////////////////////////
			case 0x41:
				OP_CODE_3({
					reg->SetAL(FlagOperation::ADD(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low)));
				},
				{
					re->string = "ADD AL, [BX+DI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD BL, [BX+DI+IMM8] /////////////////////////
			case 0x59:
				OP_CODE_3({
					reg->SetBL(FlagOperation::ADD(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low)));
				},
				{
					re->string = "ADD BL, [BX+DI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD CL, [BX+DI+IMM8] /////////////////////////
			case 0x49:
				OP_CODE_3({
					reg->SetCL(FlagOperation::ADD(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low)));
				},
				{
					re->string = "ADD CL, [BX+DI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD DL, [BX+DI+IMM8] /////////////////////////
			case 0x51:
				OP_CODE_3({
					reg->SetDL(FlagOperation::ADD(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low)));
				},
				{
					re->string = "ADD DL, [BX+DI+"+ByteToHexStr(low)+"]";
				})
		}
		/************************ ADD AH~DH, [BX+DI+IMM8] ************************/
		switch(byte)
		{
			///////////////////////// ADD AH, [BX+DI+IMM8] /////////////////////////
			case 0x61:
				OP_CODE_3({
					reg->SetAH(FlagOperation::ADD(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low)));
				},
				{
					re->string = "ADD AH, [BX+DI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD BH, [BX+DI+IMM8] /////////////////////////
			case 0x79:
				OP_CODE_3({
					reg->SetBH(FlagOperation::ADD(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low)));
				},
				{
					re->string = "ADD BH, [BX+DI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD CH, [BX+DI+IMM8] /////////////////////////
			case 0x69:
				OP_CODE_3({
					reg->SetCH(FlagOperation::ADD(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low)));
				},
				{
					re->string = "ADD CH, [BX+DI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD DH, [BX+DI+IMM8] /////////////////////////
			case 0x71:
				OP_CODE_3({
					reg->SetDH(FlagOperation::ADD(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low)));
				},
				{
					re->string = "ADD DH, [BX+DI+"+ByteToHexStr(low)+"]";
				})
		}
		
	

		high = GetByteByIP(Mem, CS, IP);
		WORD offset = 0;
		ByteSetToWord(&offset, low, high);
		/************************ ADD AL~DL, [IMM16] ************************/
		switch(byte)
		{
			///////////////////////// ADD AL, [BX+IMM16] /////////////////////////
			case 0x06:
				OP_CODE_4({
					reg->SetAL(FlagOperation::ADD(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, offset)));
				},
				{
					re->string = "ADD AL, ["+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD BL, [BX+IMM16] /////////////////////////
			case 0x1E:
				OP_CODE_4({
					reg->SetBL(FlagOperation::ADD(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, offset)));
				},
				{
					re->string = "ADD BL, ["+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD CL, [BX+IMM16] /////////////////////////
			case 0x0E:
				OP_CODE_4({
					reg->SetCL(FlagOperation::ADD(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, +offset)));
				},
				{
					re->string = "ADD CL, ["+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD DL, [BX+IMM16] /////////////////////////
			case 0x16:
				OP_CODE_4({
					reg->SetDL(FlagOperation::ADD(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, offset)));
				},
				{
					re->string = "ADD DL, ["+WordToHexStr(offset)+"]";
				})
		}
		/************************ ADD AH~DH, [IMM16] ************************/
		switch(byte)
		{
			///////////////////////// ADD AH, [BX+IMM16] /////////////////////////
			case 0x26:
				OP_CODE_4({
					reg->SetAH(FlagOperation::ADD(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, offset)));
				},
				{
					re->string = "ADD AH, ["+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD BH, [BX+IMM16] /////////////////////////
			case 0x3E:
				OP_CODE_4({
					reg->SetBH(FlagOperation::ADD(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, offset)));
				},
				{
					re->string = "ADD BH, ["+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD CH, [BX+IMM16] /////////////////////////
			case 0x2E:
				OP_CODE_4({
					reg->SetCH(FlagOperation::ADD(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, offset)));
				},
				{
					re->string = "ADD CH, ["+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD DH, [BX+IMM16] /////////////////////////
			case 0x36:
				OP_CODE_4({
					reg->SetDH(FlagOperation::ADD(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, offset)));
				},
				{
					re->string = "ADD DH, ["+WordToHexStr(offset)+"]";
				})
		}


		/************************ ADD AL~DL, [BX+IMM16] ************************/
		switch(byte)
		{
			///////////////////////// ADD AL, [BX+IMM16] /////////////////////////
			case 0x87:
				OP_CODE_4({
					reg->SetAL(FlagOperation::ADD(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, reg->BX+offset)));
				},
				{
					re->string = "ADD AL, [BX+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD BL, [BX+IMM16] /////////////////////////
			case 0x9F:
				OP_CODE_4({
					reg->SetBL(FlagOperation::ADD(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, reg->BX+offset)));
				},
				{
					re->string = "ADD BL, [BX+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD CL, [BX+IMM16] /////////////////////////
			case 0x8F:
				OP_CODE_4({
					reg->SetCL(FlagOperation::ADD(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, reg->BX+offset)));
				},
				{
					re->string = "ADD CL, [BX+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD DL, [BX+IMM16] /////////////////////////
			case 0x97:
				OP_CODE_4({
					reg->SetDL(FlagOperation::ADD(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, reg->BX+offset)));
				},
				{
					re->string = "ADD DL, [BX+"+WordToHexStr(offset)+"]";
				})
		}
		/************************ ADD AH~DH, [BX+IMM16] ************************/
		switch(byte)
		{
			///////////////////////// ADD AH, [BX+IMM16] /////////////////////////
			case 0xA7:
				OP_CODE_4({
					reg->SetAH(FlagOperation::ADD(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, reg->BX+offset)));
				},
				{
					re->string = "ADD AH, [BX+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD BH, [BX+IMM16] /////////////////////////
			case 0xBF:
				OP_CODE_4({
					reg->SetBH(FlagOperation::ADD(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, reg->BX+offset)));
				},
				{
					re->string = "ADD BH, [BX+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD CH, [BX+IMM16] /////////////////////////
			case 0xAF:
				OP_CODE_4({
					reg->SetCH(FlagOperation::ADD(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, reg->BX+offset)));
				},
				{
					re->string = "ADD CH, [BX+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD DH, [BX+IMM16] /////////////////////////
			case 0xB7:
				OP_CODE_4({
					reg->SetDH(FlagOperation::ADD(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, reg->BX+offset)));
				},
				{
					re->string = "ADD DH, [BX+"+WordToHexStr(offset)+"]";
				})
		}
		
		

		/************************ ADD AL~DL, [BX+SI+IMM16] ************************/
		switch(byte)
		{
			///////////////////////// ADD AL, [BX+SI+IMM16] /////////////////////////
			case 0x80:
				OP_CODE_4({
					reg->SetAL(FlagOperation::ADD(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset)));
				},
				{
					re->string = "ADD AL, [BX+SI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD BL, [BX+SI+IMM16] /////////////////////////
			case 0x98:
				OP_CODE_4({
					reg->SetBL(FlagOperation::ADD(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset)));
				},
				{
					re->string = "ADD BL, [BX+SI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD CL, [BX+SI+IMM16] /////////////////////////
			case 0x88:
				OP_CODE_4({
					reg->SetCL(FlagOperation::ADD(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset)));
				},
				{
					re->string = "ADD CL, [BX+SI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD DL, [BX+SI+IMM16] /////////////////////////
			case 0x90:
				OP_CODE_4({
					reg->SetDL(FlagOperation::ADD(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset)));
				},
				{
					re->string = "ADD DL, [BX+SI+"+WordToHexStr(offset)+"]";
				})
		}
		/************************ ADD AH~DH, [BX+SI+IMM16] ************************/
		switch(byte)
		{
			///////////////////////// ADD AH, [BX+SI+IMM16] /////////////////////////
			case 0xA0:
				OP_CODE_4({
					reg->SetAH(FlagOperation::ADD(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset)));
				},
				{
					re->string = "ADD AH, [BX+SI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD BH, [BX+SI+IMM16] /////////////////////////
			case 0xB8:
				OP_CODE_4({
					reg->SetBH(FlagOperation::ADD(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset)));
				},
				{
					re->string = "ADD BH, [BX+SI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD CH, [BX+SI+IMM16] /////////////////////////
			case 0xA8:
				OP_CODE_4({
					reg->SetCH(FlagOperation::ADD(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset)));
				},
				{
					re->string = "ADD CH, [BX+SI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD DH, [BX+SI+IMM16] /////////////////////////
			case 0xB0:
				OP_CODE_4({
					reg->SetDH(FlagOperation::ADD(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset)));
				},
				{
					re->string = "ADD DH, [BX+SI+"+WordToHexStr(offset)+"]";
				})
		}
		
		

		/************************ ADD AL~DL, [BX+DI+IMM16] ************************/
		switch(byte)
		{
			///////////////////////// ADD AL, [BX+DI+IMM16] /////////////////////////
			case 0x81:
				OP_CODE_4({
					reg->SetAL(FlagOperation::ADD(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset)));
				},
				{
					re->string = "ADD AL, [BX+DI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD BL, [BX+DI+IMM16] /////////////////////////
			case 0x99:
				OP_CODE_4({
					reg->SetBL(FlagOperation::ADD(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset)));
				},
				{
					re->string = "ADD BL, [BX+DI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD CL, [BX+DI+IMM16] /////////////////////////
			case 0x89:
				OP_CODE_4({
					reg->SetCL(FlagOperation::ADD(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset)));
				},
				{
					re->string = "ADD CL, [BX+DI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD DL, [BX+DI+IMM16] /////////////////////////
			case 0x91:
				OP_CODE_4({
					reg->SetDL(FlagOperation::ADD(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset)));
				},
				{
					re->string = "ADD DL, [BX+DI+"+WordToHexStr(offset)+"]";
				})
		}
		/************************ ADD AH~DH, [BX+DI+IMM16] ************************/
		switch(byte)
		{
			///////////////////////// ADD AH, [BX+DI+IMM16] /////////////////////////
			case 0xA1:
				OP_CODE_4({
					reg->SetAH(FlagOperation::ADD(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset)));
				},
				{
					re->string = "ADD AH, [BX+DI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD BH, [BX+DI+IMM16] /////////////////////////
			case 0xB9:
				OP_CODE_4({
					reg->SetBH(FlagOperation::ADD(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset)));
				},
				{
					re->string = "ADD BH, [BX+DI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD CH, [BX+DI+IMM16] /////////////////////////
			case 0xA9:
				OP_CODE_4({
					reg->SetCH(FlagOperation::ADD(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset)));
				},
				{
					re->string = "ADD CH, [BX+DI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD DH, [BX+DI+IMM16] /////////////////////////
			case 0xB1:
				OP_CODE_4({
					reg->SetDH(FlagOperation::ADD(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset)));
				},
				{
					re->string = "ADD DH, [BX+DI+"+WordToHexStr(offset)+"]";
				})
		}
		
	};

	//////////////////////////////////////////////////
	//		ADD AX~DX, AX~DX  
	//		ADD DI\SI, AX~DX  
	//		ADD AX~DX, [BX]   
	//		ADD AX~DX, [BX+IMM8]   
	//		ADD AX~DX, [BX+IMM16]   
	//		ADD AX~DX, [BX+SI/DI]   
	//		ADD AX~DX, [BX+SI/DI+IMM8]   
	//		ADD AX~DX, [BX+SI/DI+IMM16] 
	//////////////////////////////////////////////////
	BindOpCodeCall(0x03){
		BYTE byte = GetByteByIP(Mem, CS, IP);		
		BYTE high = GetByteHigh(byte);
		BYTE low = GetByteLow(byte);
		///////////////////////// ADD AX~DX, AX~DX /////////////////////////
		switch(high){
			case 0x0C:
				switch(low){
					///////////////////////// ADD AX, AX /////////////////////////
					case 0x00:	
						OP_CODE_2({
							reg->AX = FlagOperation::ADD(Mem, reg, reg->AX, reg->AX);
						},
						{
							re->string = "ADD AX, AX";
						})
					///////////////////////// ADD AX, BX /////////////////////////
					case 0x03:
						OP_CODE_2({
							reg->AX = FlagOperation::ADD(Mem, reg, reg->AX, reg->BX);
						},
						{
							re->string = "ADD AX, BX";
						})
					///////////////////////// ADD AX, CX /////////////////////////
					case 0x01:
						OP_CODE_2({
							reg->AX = FlagOperation::ADD(Mem, reg, reg->AX, reg->CX);
						},
						{
							re->string = "ADD AX, CX";
						})
					///////////////////////// ADD AX, DX /////////////////////////
					case 0x02:
						OP_CODE_2({
							reg->AX = FlagOperation::ADD(Mem, reg, reg->AX, reg->DX);
						},
						{
							re->string = "ADD AX, DX";
						})

						
					///////////////////////// ADD CX, AX /////////////////////////
					case 0x0B:
						OP_CODE_2({
							reg->CX = FlagOperation::ADD(Mem, reg, reg->CX, reg->AX);
						},
						{
							re->string = "ADD CX, AX";
						})
					///////////////////////// ADD CX, BX /////////////////////////
					case 0x09:
						OP_CODE_2({
							reg->CX = FlagOperation::ADD(Mem, reg, reg->CX, reg->BX);
						},
						{
							re->string = "ADD CX, BX";
						})
					///////////////////////// ADD CX, CX /////////////////////////
					case 0x0A:
						OP_CODE_2({
							reg->CX = FlagOperation::ADD(Mem, reg, reg->CX, reg->CX);
						},
						{
							re->string = "ADD CX, CX";
						})
					///////////////////////// ADD CX, DX /////////////////////////
					case 0x08:
						OP_CODE_2({
							reg->CX = FlagOperation::ADD(Mem, reg, reg->CX, reg->DX);
						},
						{
							re->string = "ADD CX, DX";
						})
				}
				break;

			case 0x0D:
				switch(low){
					///////////////////////// ADD BX, AX /////////////////////////
					case 0x00:	
						OP_CODE_2({
							reg->BX = FlagOperation::ADD(Mem, reg, reg->BX, reg->AX);
						},
						{
							re->string = "ADD BX, AX";
						})
					///////////////////////// ADD BX, BX /////////////////////////
					case 0x03:
						OP_CODE_2({
							reg->BX = FlagOperation::ADD(Mem, reg, reg->BX, reg->BX);
						},
						{
							re->string = "ADD BX, BX";
						})
					///////////////////////// ADD BX, CX /////////////////////////
					case 0x01:
						OP_CODE_2({
							reg->BX = FlagOperation::ADD(Mem, reg, reg->BX, reg->CX);
						},
						{
							re->string = "ADD BX, CX";
						})
					///////////////////////// ADD BX, DX /////////////////////////
					case 0x02:
						OP_CODE_2({
							reg->BX = FlagOperation::ADD(Mem, reg, reg->BX, reg->DX);
						},
						{
							re->string = "ADD BX, DX";
						})

						
					///////////////////////// ADD DX, AX /////////////////////////
					case 0x0B:
						OP_CODE_2({
							reg->DX = FlagOperation::ADD(Mem, reg, reg->DX, reg->AX);
						},
						{
							re->string = "ADD DX, AX";
						})
					///////////////////////// ADD DX, BX /////////////////////////
					case 0x09:
						OP_CODE_2({
							reg->DX = FlagOperation::ADD(Mem, reg, reg->DX, reg->BX);
						},
						{
							re->string = "ADD DX, BX";
						})
					///////////////////////// ADD DX, CX /////////////////////////
					case 0x0A:
						OP_CODE_2({
							reg->DX = FlagOperation::ADD(Mem, reg, reg->DX, reg->CX);
						},
						{
							re->string = "ADD DX, CX";
						})
					///////////////////////// ADD DX, DX /////////////////////////
					case 0x08:
						OP_CODE_2({
							reg->DX = FlagOperation::ADD(Mem, reg, reg->DX, reg->DX);
						},
						{
							re->string = "ADD DX, DX";
						})
				}
				break;
		}
		///////////////////////// ADD DI\SI, AX~DX /////////////////////////
		if (high==0x0f)
		{
			switch(low)
			{
				case 0x00:{
					OP_CODE_2({
						reg->SI = FlagOperation::ADD(Mem, reg, reg->SI, reg->AX);
					},
					{
						re->string = "ADD SI, AX";
					})
				}
				case 0x08:{
					OP_CODE_2({
						reg->DI = FlagOperation::ADD(Mem, reg, reg->DI, reg->AX);
					},
					{
						re->string = "ADD DI, AX";
					})
				}
			}
		}
		

		WORD word = 0;
		///////////////////////// ADD AX~DX, [BX] /////////////////////////
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX), *VMtoRM(Mem, reg->DS, reg->BX+1));
		switch(byte)
		{
			///////////////////////// ADD AX, [BX] /////////////////////////
			case 0x07:
				OP_CODE_2({
					reg->AX = FlagOperation::ADD(Mem, reg, reg->AX, word);
				},
				{
					re->string = "ADD AX, [BX]";
				})
			///////////////////////// ADD BX, [BX] /////////////////////////
			case 0x1F:
				OP_CODE_2({
					reg->BX = FlagOperation::ADD(Mem, reg, reg->BX, word);
				},
				{
					re->string = "ADD AX, [BX]";
				})
			///////////////////////// ADD CX, [BX] /////////////////////////
			case 0x0F:
				OP_CODE_2({
					reg->CX = FlagOperation::ADD(Mem, reg, reg->CX, word);
				},
				{
					re->string = "ADD AX, [BX]";
				})
			///////////////////////// ADD DX, [BX] /////////////////////////
			case 0x17:
				OP_CODE_2({
					reg->DX = FlagOperation::ADD(Mem, reg, reg->DX, word);
				},
				{
					re->string = "ADD AX, [BX]";
				})
		}
	
		///////////////////////// ADD AX~DX, [BX+SI] /////////////////////////
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->SI), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+1));
		switch(byte)
		{
			///////////////////////// ADD AX, [BX+SI] /////////////////////////
			case 0x00:
				OP_CODE_2({
					reg->AX = FlagOperation::ADD(Mem, reg, reg->AX, word);
				},
				{
					re->string = "ADD AX, [BX+SI]";
				})
			///////////////////////// ADD BX, [BX+SI] /////////////////////////
			case 0x18:
				OP_CODE_2({
					reg->BX = FlagOperation::ADD(Mem, reg, reg->BX, word);
				},
				{
					re->string = "ADD AX, [BX+SI]";
				})
			///////////////////////// ADD CX, [BX+SI] /////////////////////////
			case 0x08:
				OP_CODE_2({
					reg->CX = FlagOperation::ADD(Mem, reg, reg->CX, word);
				},
				{
					re->string = "ADD AX, [BX+SI]";
				})
			///////////////////////// ADD DX, [BX+SI] /////////////////////////
			case 0x10:
				OP_CODE_2({
					reg->DX = FlagOperation::ADD(Mem, reg, reg->DX, word);
				},
				{
					re->string = "ADD AX, [BX+SI]";
				})
		}
		
		///////////////////////// ADD AX~DX, [BX+DI] /////////////////////////
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->DI), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+1));
		switch(byte)
		{
			///////////////////////// ADD AX, [BX+DI] /////////////////////////
			case 0x01:
				OP_CODE_2({
					reg->AX = FlagOperation::ADD(Mem, reg, reg->AX, word);
				},
				{
					re->string = "ADD AX, [BX+DI]";
				})
			///////////////////////// ADD BX, [BX+DI] /////////////////////////
			case 0x19:
				OP_CODE_2({
					reg->BX = FlagOperation::ADD(Mem, reg, reg->BX, word);
				},
				{
					re->string = "ADD AX, [BX+DI]";
				})
			///////////////////////// ADD CX, [BX+DI] /////////////////////////
			case 0x09:
				OP_CODE_2({
					reg->CX = FlagOperation::ADD(Mem, reg, reg->CX, word);
				},
				{
					re->string = "ADD AX, [BX+DI]";
				})
			///////////////////////// ADD DX, [BX+DI] /////////////////////////
			case 0x11:
				OP_CODE_2({
					reg->DX = FlagOperation::ADD(Mem, reg, reg->DX, word);
				},
				{
					re->string = "ADD AX, [BX+DI]";
				})
		}

		low = GetByteByIP(Mem, CS, IP);
		///////////////////////// ADD AX~DX, [BX+IMM8] /////////////////////////
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+low), *VMtoRM(Mem, reg->DS, reg->BX+low+1));
		switch(byte)
		{
			///////////////////////// ADD AX, [BX+IMM8] /////////////////////////
			case 0x47:
				OP_CODE_3({
					reg->AX = FlagOperation::ADD(Mem, reg, reg->AX, word);
				},
				{
					re->string = "ADD AX, [BX+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD BX, [BX+IMM8] /////////////////////////
			case 0x5F:
				OP_CODE_3({
					reg->BX = FlagOperation::ADD(Mem, reg, reg->BX, word);
				},
				{
					re->string = "ADD AX, [BX+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD CX, [BX+IMM8] /////////////////////////
			case 0x4F:
				OP_CODE_3({
					reg->CX = FlagOperation::ADD(Mem, reg, reg->CX, word);
				},
				{
					re->string = "ADD AX, [BX+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD DX, [BX+IMM8] /////////////////////////
			case 0x57:
				OP_CODE_3({
					reg->DX = FlagOperation::ADD(Mem, reg, reg->DX, word);
				},
				{
					re->string = "ADD AX, [BX+"+ByteToHexStr(low)+"]";
				})
		}
		
		///////////////////////// ADD AX~DX, [BX+SI+IMM8] /////////////////////////
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low+1));
		switch(byte)
		{
			///////////////////////// ADD AX, [BX+SI+IMM8] /////////////////////////
			case 0x40:
				OP_CODE_3({
					reg->AX = FlagOperation::ADD(Mem, reg, reg->AX, word);
				},
				{
					re->string = "ADD AX, [BX+SI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD BX, [BX+SI+IMM8] /////////////////////////
			case 0x58:
				OP_CODE_3({
					reg->BX = FlagOperation::ADD(Mem, reg, reg->BX, word);
				},
				{
					re->string = "ADD AX, [BX+SI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD CX, [BX+SI+IMM8] /////////////////////////
			case 0x48:
				OP_CODE_3({
					reg->CX = FlagOperation::ADD(Mem, reg, reg->CX, word);
				},
				{
					re->string = "ADD AX, [BX+SI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD DX, [BX+SI+IMM8] /////////////////////////
			case 0x50:
				OP_CODE_3({
					reg->DX = FlagOperation::ADD(Mem, reg, reg->DX, word);
				},
				{
					re->string = "ADD AX, [BX+SI+"+ByteToHexStr(low)+"]";
				})
		}
		
		///////////////////////// ADD AX~DX, [BX+DI+IMM8] /////////////////////////
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low+1));
		switch(byte)
		{
			///////////////////////// ADD AX, [BX+DI+IMM8] /////////////////////////
			case 0x41:
				OP_CODE_3({
					reg->AX = FlagOperation::ADD(Mem, reg, reg->AX, word);
				},
				{
					re->string = "ADD AX, [BX+DI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD BX, [BX+DI+IMM8] /////////////////////////
			case 0x59:
				OP_CODE_3({
					reg->BX = FlagOperation::ADD(Mem, reg, reg->BX, word);
				},
				{
					re->string = "ADD AX, [BX+DI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD CX, [BX+DI+IMM8] /////////////////////////
			case 0x49:
				OP_CODE_3({
					reg->CX = FlagOperation::ADD(Mem, reg, reg->CX, word);
				},
				{
					re->string = "ADD AX, [BX+DI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// ADD DX, [BX+DI+IMM8] /////////////////////////
			case 0x51:
				OP_CODE_3({
					reg->DX = FlagOperation::ADD(Mem, reg, reg->DX, word);
				},
				{
					re->string = "ADD AX, [BX+DI+"+ByteToHexStr(low)+"]";
				})
		}

		high = GetByteByIP(Mem, CS, IP);
		WORD offset;
		ByteSetToWord(&offset, low, high);
		///////////////////////// ADD AX~DX, [BX+IMM16] /////////////////////////
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+offset), *VMtoRM(Mem, reg->DS, reg->BX+offset+1));
		switch(byte)
		{
			///////////////////////// ADD AX, [BX+IMM16] /////////////////////////
			case 0x87:
				OP_CODE_4({
					reg->AX = FlagOperation::ADD(Mem, reg, reg->AX, word);
				},
				{
					re->string = "ADD AX, [BX+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD BX, [BX+IMM16] /////////////////////////
			case 0x9F:
				OP_CODE_4({
					reg->BX = FlagOperation::ADD(Mem, reg, reg->BX, word);
				},
				{
					re->string = "ADD AX, [BX+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD CX, [BX+IMM16] /////////////////////////
			case 0x8F:
				OP_CODE_4({
					reg->CX = FlagOperation::ADD(Mem, reg, reg->CX, word);
				},
				{
					re->string = "ADD AX, [BX+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD DX, [BX+IMM16] /////////////////////////
			case 0x97:
				OP_CODE_4({
					reg->DX = FlagOperation::ADD(Mem, reg, reg->DX, word);
				},
				{
					re->string = "ADD AX, [BX+"+WordToHexStr(offset)+"]";
				})
		}

		///////////////////////// ADD AX~DX, [BX+SI+IMM16] /////////////////////////
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset+1));
		switch(byte)
		{
			///////////////////////// ADD AX, [BX+SI+IMM16] /////////////////////////
			case 0x80:
				OP_CODE_4({
					reg->AX = FlagOperation::ADD(Mem, reg, reg->AX, word);
				},
				{
					re->string = "ADD AX, [BX+SI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD BX, [BX+SI+IMM16] /////////////////////////
			case 0x98:
				OP_CODE_4({
					reg->BX = FlagOperation::ADD(Mem, reg, reg->BX, word);
				},
				{
					re->string = "ADD AX, [BX+SI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD CX, [BX+SI+IMM16] /////////////////////////
			case 0x88:
				OP_CODE_4({
					reg->CX = FlagOperation::ADD(Mem, reg, reg->CX, word);
				},
				{
					re->string = "ADD AX, [BX+SI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD DX, [BX+SI+IMM16] /////////////////////////
			case 0x90:
				OP_CODE_4({
					reg->DX = FlagOperation::ADD(Mem, reg, reg->DX, word);
				},
				{
					re->string = "ADD AX, [BX+SI+"+WordToHexStr(offset)+"]";
				})
		}
		
		///////////////////////// ADD AX~DX, [BX+DI+IMM16] /////////////////////////
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset+1));
		switch(byte)
		{
			///////////////////////// ADD AX, [BX+DI+IMM16] /////////////////////////
			case 0x81:
				OP_CODE_4({
					reg->AX = FlagOperation::ADD(Mem, reg, reg->AX, word);
				},
				{
					re->string = "ADD AX, [BX+DI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD BX, [BX+DI+IMM16] /////////////////////////
			case 0x99:
				OP_CODE_4({
					reg->BX = FlagOperation::ADD(Mem, reg, reg->BX, word);
				},
				{
					re->string = "ADD AX, [BX+DI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD CX, [BX+DI+IMM16] /////////////////////////
			case 0x89:
				OP_CODE_4({
					reg->CX = FlagOperation::ADD(Mem, reg, reg->CX, word);
				},
				{
					re->string = "ADD AX, [BX+DI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// ADD DX, [BX+DI+IMM16] /////////////////////////
			case 0x91:
				OP_CODE_4({
					reg->DX = FlagOperation::ADD(Mem, reg, reg->DX, word);
				},
				{
					re->string = "ADD AX, [BX+DI+"+WordToHexStr(offset)+"]";
				})
		}
	};

	//////////////////////////////////////////////////
	//		ADD AL, IMM8   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x04){
		BYTE byte = GetByteByIP(Mem, CS, IP);
		
		OP_CODE_2({
			reg->SetAL(FlagOperation::ADD(Mem, reg, reg->GetAL(), byte));
		}, 
		{
			re->string = "ADD AL, " + ByteToHexStr(byte);
		})
	};

	//////////////////////////////////////////////////
	//		ADD AX, IMM16   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x05){
		BYTE low = GetByteByIP(Mem, CS, IP);
		BYTE high = GetByteByIP(Mem, CS, IP);
		WORD word = 0;
		ByteSetToWord(&word, low, high);
		OP_CODE_3({
			reg->AX = FlagOperation::ADD(Mem, reg, reg->AX, word);
		}, 
		{
			re->string = "ADD AX, " + WordToHexStr(word);
		})
	};

	//////////////////////////////////////////////////
	//		PUSH ES   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x06){
		OP_CODE_1({
			WordSetToByte(reg->ES, VMtoRM(Mem, reg->SS, reg->SP-2), VMtoRM(Mem, reg->SS, reg->SP-1));
			reg->SP = reg->SP - 2;
		}, 
		{
			re->string = "PUSH ES";
		})
	};

	//////////////////////////////////////////////////
	//		POP ES   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x07){
		OP_CODE_1({
			ByteSetToWord(&reg->ES, *VMtoRM(Mem, reg->SS, reg->SP), *VMtoRM(Mem, reg->SS, reg->SP+1));
			reg->SP = reg->SP + 2;
		}, 
		{
			re->string = "POP ES";
		})
	};

	//////////////////////////////////////////////////
	//		OR AL~DL\AH~DH, AL~DL\AH~DH   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x0A){
		BYTE byte = GetByteByIP(Mem, CS, IP);

		/************************ OR AL~DL\AH~DH, AL~DL\AH~DH ************************/
		BYTE high = GetByteHigh(byte);
		BYTE low = GetByteLow(byte);
		BYTE OpNum_2 = 0;
		std::string strOpNum_2 = "??";
		// 低位决定第二个操作数
		if (low >= 0x08) low = low - 0x08;
		switch(low)
		{
			case 0X00:
				OpNum_2 = reg->GetAL();
				strOpNum_2 = "AL";
				break;
			case 0X03:
				OpNum_2 = reg->GetBL();
				strOpNum_2 = "BL";
				break;
			case 0X01:
				OpNum_2 = reg->GetCL();
				strOpNum_2 = "CL";
				break;
			case 0X02:
				OpNum_2 = reg->GetDL();
				strOpNum_2 = "DL";
				break;
			case 0X04:
				OpNum_2 = reg->GetAH();
				strOpNum_2 = "AH";
				break;
			case 0X07:
				OpNum_2 = reg->GetBH();
				strOpNum_2 = "BH";
				break;
			case 0X05:
				OpNum_2 = reg->GetCH();
				strOpNum_2 = "CH";
				break;
			case 0X06:
				OpNum_2 = reg->GetDH();
				strOpNum_2 = "DH";
				break;
		}
		// 高位和低位的低位的第4位决定第一个操作数
		high = high + (low&0x08);
		switch(high)
		{
			case 0x0C:
				OP_CODE_2({						
					reg->SetAL(FlagOperation::OR(Mem, reg, reg->GetAL(), OpNum_2));
				},
				{
					re->string = "OR AL, " + strOpNum_2;
				})
			case 0x0D:
				OP_CODE_2({						
					reg->SetBL(FlagOperation::OR(Mem, reg, reg->GetBL(), OpNum_2));
				},
				{
					re->string = "OR BL, " + strOpNum_2;
				})
			case 0x0E:
				OP_CODE_2({						
					reg->SetAH(FlagOperation::OR(Mem, reg, reg->GetAH(), OpNum_2));
				},
				{
					re->string = "OR AH, " + strOpNum_2;
				})
			case 0x0F:
				OP_CODE_2({						
					reg->SetBH(FlagOperation::OR(Mem, reg, reg->GetBH(), OpNum_2));
				},
				{
					re->string = "OR BH, " + strOpNum_2;
				})
			case 0x14:
				OP_CODE_2({						
					reg->SetCL(FlagOperation::OR(Mem, reg, reg->GetCL(), OpNum_2));
				},
				{
					re->string = "OR CL, " + strOpNum_2;
				})
			case 0x15:
				OP_CODE_2({						
					reg->SetDL(FlagOperation::OR(Mem, reg, reg->GetDL(), OpNum_2));
				},
				{
					re->string = "OR DL, " + strOpNum_2;
				})
			case 0x16:
				OP_CODE_2({						
					reg->SetCH(FlagOperation::OR(Mem, reg, reg->GetCH(), OpNum_2));
				},
				{
					re->string = "OR CH, " + strOpNum_2;
				})
			case 0x17:
				OP_CODE_2({						
					reg->SetDH(FlagOperation::OR(Mem, reg, reg->GetDH(), OpNum_2));
				},
				{
					re->string = "OR DH, " + strOpNum_2;
				})
		}
	};

	//////////////////////////////////////////////////
	//		OR AX~DX, AX~DX   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x0B){
		BYTE byte = GetByteByIP(Mem, CS, IP);		
		BYTE high = GetByteHigh(byte);
		BYTE low = GetByteLow(byte);
		///////////////////////// OR AX~DX, AX~DX /////////////////////////
		switch(high){
			case 0x0C:
				switch(low){
					///////////////////////// OR AX, AX /////////////////////////
					case 0x00:	
						OP_CODE_2({
							reg->AX = FlagOperation::OR(Mem, reg, reg->AX, reg->AX);
						},
						{
							re->string = "OR AX, AX";
						})
					///////////////////////// OR AX, BX /////////////////////////
					case 0x03:
						OP_CODE_2({
							reg->AX = FlagOperation::OR(Mem, reg, reg->AX, reg->BX);
						},
						{
							re->string = "OR AX, BX";
						})
					///////////////////////// OR AX, CX /////////////////////////
					case 0x01:
						OP_CODE_2({
							reg->AX = FlagOperation::OR(Mem, reg, reg->AX, reg->CX);
						},
						{
							re->string = "OR AX, CX";
						})
					///////////////////////// OR AX, DX /////////////////////////
					case 0x02:
						OP_CODE_2({
							reg->AX = FlagOperation::OR(Mem, reg, reg->AX, reg->DX);
						},
						{
							re->string = "OR AX, DX";
						})

						
					///////////////////////// OR CX, AX /////////////////////////
					case 0x0B:
						OP_CODE_2({
							reg->CX = FlagOperation::OR(Mem, reg, reg->CX, reg->AX);
						},
						{
							re->string = "OR CX, AX";
						})
					///////////////////////// OR CX, BX /////////////////////////
					case 0x09:
						OP_CODE_2({
							reg->CX = FlagOperation::OR(Mem, reg, reg->CX, reg->BX);
						},
						{
							re->string = "OR CX, BX";
						})
					///////////////////////// OR CX, CX /////////////////////////
					case 0x0A:
						OP_CODE_2({
							reg->CX = FlagOperation::OR(Mem, reg, reg->CX, reg->CX);
						},
						{
							re->string = "OR CX, CX";
						})
					///////////////////////// OR CX, DX /////////////////////////
					case 0x08:
						OP_CODE_2({
							reg->CX = FlagOperation::OR(Mem, reg, reg->CX, reg->DX);
						},
						{
							re->string = "OR CX, DX";
						})
				}
				break;

			case 0x0D:
				switch(low){
					///////////////////////// OR BX, AX /////////////////////////
					case 0x00:	
						OP_CODE_2({
							reg->BX = FlagOperation::OR(Mem, reg, reg->BX, reg->AX);
						},
						{
							re->string = "OR BX, AX";
						})
					///////////////////////// OR BX, BX /////////////////////////
					case 0x03:
						OP_CODE_2({
							reg->BX = FlagOperation::OR(Mem, reg, reg->BX, reg->BX);
						},
						{
							re->string = "OR BX, BX";
						})
					///////////////////////// OR BX, CX /////////////////////////
					case 0x01:
						OP_CODE_2({
							reg->BX = FlagOperation::OR(Mem, reg, reg->BX, reg->CX);
						},
						{
							re->string = "OR BX, CX";
						})
					///////////////////////// OR BX, DX /////////////////////////
					case 0x02:
						OP_CODE_2({
							reg->BX = FlagOperation::OR(Mem, reg, reg->BX, reg->DX);
						},
						{
							re->string = "OR BX, DX";
						})

						
					///////////////////////// OR DX, AX /////////////////////////
					case 0x0B:
						OP_CODE_2({
							reg->DX = FlagOperation::OR(Mem, reg, reg->DX, reg->AX);
						},
						{
							re->string = "OR DX, AX";
						})
					///////////////////////// OR DX, BX /////////////////////////
					case 0x09:
						OP_CODE_2({
							reg->DX = FlagOperation::OR(Mem, reg, reg->DX, reg->BX);
						},
						{
							re->string = "OR DX, BX";
						})
					///////////////////////// OR DX, CX /////////////////////////
					case 0x0A:
						OP_CODE_2({
							reg->DX = FlagOperation::OR(Mem, reg, reg->DX, reg->CX);
						},
						{
							re->string = "OR DX, CX";
						})
					///////////////////////// OR DX, DX /////////////////////////
					case 0x08:
						OP_CODE_2({
							reg->DX = FlagOperation::OR(Mem, reg, reg->DX, reg->DX);
						},
						{
							re->string = "OR DX, DX";
						})
				}
				break;
		}
	};

	//////////////////////////////////////////////////
	//		PUSH CS   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x0E){
		OP_CODE_1({
			WordSetToByte(reg->CS, VMtoRM(Mem, reg->SS, reg->SP-2), VMtoRM(Mem, reg->SS, reg->SP-1));
			reg->SP = reg->SP - 2;
		}, 
		{
			re->string = "PUSH CS";
		})
	};

	//////////////////////////////////////////////////
	//		PUSH SS   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x16){
		OP_CODE_1({
			WordSetToByte(reg->SS, VMtoRM(Mem, reg->SS, reg->SP-2), VMtoRM(Mem, reg->SS, reg->SP-1));
			reg->SP = reg->SP - 2;
		}, 
		{
			re->string = "PUSH SS";
		})
	};

	//////////////////////////////////////////////////
	//		POP SS   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x17){
		OP_CODE_1({
			ByteSetToWord(&reg->SS, *VMtoRM(Mem, reg->SS, reg->SP), *VMtoRM(Mem, reg->SS, reg->SP+1));
			reg->SP = reg->SP + 2;
		}, 
		{
			re->string = "POP SS";
		})
	};

	//////////////////////////////////////////////////
	//		PUSH DS   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x1E){
		OP_CODE_1({
			WordSetToByte(reg->DS, VMtoRM(Mem, reg->SS, reg->SP-2), VMtoRM(Mem, reg->SS, reg->SP-1));
			reg->SP = reg->SP - 2;
		}, 
		{
			re->string = "PUSH DS";
		})
	};

	//////////////////////////////////////////////////
	//		POP DS   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x1F){
		OP_CODE_1({
			ByteSetToWord(&reg->DS, *VMtoRM(Mem, reg->SS, reg->SP), *VMtoRM(Mem, reg->SS, reg->SP+1));
			reg->SP = reg->SP + 2;
		}, 
		{
			re->string = "POP DS";
		})
	};

	//////////////////////////////////////////////////
	//		AND AL~DL\AH~DH, AL~DL\AH~DH   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x22){
		BYTE byte = GetByteByIP(Mem, CS, IP);

		/************************ AND AL~DL\AH~DH, AL~DL\AH~DH ************************/
		BYTE high = GetByteHigh(byte);
		BYTE low = GetByteLow(byte);
		BYTE OpNum_2 = 0;
		std::string strOpNum_2 = "??";
		// 低位决定第二个操作数
		if (low >= 0x08) low = low - 0x08;
		switch(low)
		{
			case 0X00:
				OpNum_2 = reg->GetAL();
				strOpNum_2 = "AL";
				break;
			case 0X03:
				OpNum_2 = reg->GetBL();
				strOpNum_2 = "BL";
				break;
			case 0X01:
				OpNum_2 = reg->GetCL();
				strOpNum_2 = "CL";
				break;
			case 0X02:
				OpNum_2 = reg->GetDL();
				strOpNum_2 = "DL";
				break;
			case 0X04:
				OpNum_2 = reg->GetAH();
				strOpNum_2 = "AH";
				break;
			case 0X07:
				OpNum_2 = reg->GetBH();
				strOpNum_2 = "BH";
				break;
			case 0X05:
				OpNum_2 = reg->GetCH();
				strOpNum_2 = "CH";
				break;
			case 0X06:
				OpNum_2 = reg->GetDH();
				strOpNum_2 = "DH";
				break;
		}
		// 高位和低位的低位的第4位决定第一个操作数
		high = high + (low&0x08);
		switch(high)
		{
			case 0x0C:
				OP_CODE_2({						
					reg->SetAL(FlagOperation::AND(Mem, reg, reg->GetAL(), OpNum_2));
				},
				{
					re->string = "AND AL, " + strOpNum_2;
				})
			case 0x0D:
				OP_CODE_2({						
					reg->SetBL(FlagOperation::AND(Mem, reg, reg->GetBL(), OpNum_2));
				},
				{
					re->string = "AND BL, " + strOpNum_2;
				})
			case 0x0E:
				OP_CODE_2({						
					reg->SetAH(FlagOperation::AND(Mem, reg, reg->GetAH(), OpNum_2));
				},
				{
					re->string = "AND AH, " + strOpNum_2;
				})
			case 0x0F:
				OP_CODE_2({						
					reg->SetBH(FlagOperation::AND(Mem, reg, reg->GetBH(), OpNum_2));
				},
				{
					re->string = "AND BH, " + strOpNum_2;
				})
			case 0x14:
				OP_CODE_2({						
					reg->SetCL(FlagOperation::AND(Mem, reg, reg->GetCL(), OpNum_2));
				},
				{
					re->string = "AND CL, " + strOpNum_2;
				})
			case 0x15:
				OP_CODE_2({						
					reg->SetDL(FlagOperation::AND(Mem, reg, reg->GetDL(), OpNum_2));
				},
				{
					re->string = "AND DL, " + strOpNum_2;
				})
			case 0x16:
				OP_CODE_2({						
					reg->SetCH(FlagOperation::AND(Mem, reg, reg->GetCH(), OpNum_2));
				},
				{
					re->string = "AND CH, " + strOpNum_2;
				})
			case 0x17:
				OP_CODE_2({						
					reg->SetDH(FlagOperation::AND(Mem, reg, reg->GetDH(), OpNum_2));
				},
				{
					re->string = "AND DH, " + strOpNum_2;
				})
		}
	};

	//////////////////////////////////////////////////
	//		AND AX~DX, AX~DX   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x23){
		BYTE byte = GetByteByIP(Mem, CS, IP);		
		BYTE high = GetByteHigh(byte);
		BYTE low = GetByteLow(byte);
		///////////////////////// AND AX~DX, AX~DX /////////////////////////
		switch(high){
			case 0x0C:
				switch(low){
					///////////////////////// AND AX, AX /////////////////////////
					case 0x00:	
						OP_CODE_2({
							reg->AX = FlagOperation::AND(Mem, reg, reg->AX, reg->AX);
						},
						{
							re->string = "AND AX, AX";
						})
					///////////////////////// AND AX, BX /////////////////////////
					case 0x03:
						OP_CODE_2({
							reg->AX = FlagOperation::AND(Mem, reg, reg->AX, reg->BX);
						},
						{
							re->string = "AND AX, BX";
						})
					///////////////////////// AND AX, CX /////////////////////////
					case 0x01:
						OP_CODE_2({
							reg->AX = FlagOperation::AND(Mem, reg, reg->AX, reg->CX);
						},
						{
							re->string = "AND AX, CX";
						})
					///////////////////////// AND AX, DX /////////////////////////
					case 0x02:
						OP_CODE_2({
							reg->AX = FlagOperation::AND(Mem, reg, reg->AX, reg->DX);
						},
						{
							re->string = "AND AX, DX";
						})

						
					///////////////////////// AND CX, AX /////////////////////////
					case 0x0B:
						OP_CODE_2({
							reg->CX = FlagOperation::AND(Mem, reg, reg->CX, reg->AX);
						},
						{
							re->string = "AND CX, AX";
						})
					///////////////////////// AND CX, BX /////////////////////////
					case 0x09:
						OP_CODE_2({
							reg->CX = FlagOperation::AND(Mem, reg, reg->CX, reg->BX);
						},
						{
							re->string = "AND CX, BX";
						})
					///////////////////////// AND CX, CX /////////////////////////
					case 0x0A:
						OP_CODE_2({
							reg->CX = FlagOperation::AND(Mem, reg, reg->CX, reg->CX);
						},
						{
							re->string = "AND CX, CX";
						})
					///////////////////////// AND CX, DX /////////////////////////
					case 0x08:
						OP_CODE_2({
							reg->CX = FlagOperation::AND(Mem, reg, reg->CX, reg->DX);
						},
						{
							re->string = "AND CX, DX";
						})
				}
				break;

			case 0x0D:
				switch(low){
					///////////////////////// AND BX, AX /////////////////////////
					case 0x00:	
						OP_CODE_2({
							reg->BX = FlagOperation::AND(Mem, reg, reg->BX, reg->AX);
						},
						{
							re->string = "AND BX, AX";
						})
					///////////////////////// AND BX, BX /////////////////////////
					case 0x03:
						OP_CODE_2({
							reg->BX = FlagOperation::AND(Mem, reg, reg->BX, reg->BX);
						},
						{
							re->string = "AND BX, BX";
						})
					///////////////////////// AND BX, CX /////////////////////////
					case 0x01:
						OP_CODE_2({
							reg->BX = FlagOperation::AND(Mem, reg, reg->BX, reg->CX);
						},
						{
							re->string = "AND BX, CX";
						})
					///////////////////////// AND BX, DX /////////////////////////
					case 0x02:
						OP_CODE_2({
							reg->BX = FlagOperation::AND(Mem, reg, reg->BX, reg->DX);
						},
						{
							re->string = "AND BX, DX";
						})

						
					///////////////////////// AND DX, AX /////////////////////////
					case 0x0B:
						OP_CODE_2({
							reg->DX = FlagOperation::AND(Mem, reg, reg->DX, reg->AX);
						},
						{
							re->string = "AND DX, AX";
						})
					///////////////////////// AND DX, BX /////////////////////////
					case 0x09:
						OP_CODE_2({
							reg->DX = FlagOperation::AND(Mem, reg, reg->DX, reg->BX);
						},
						{
							re->string = "AND DX, BX";
						})
					///////////////////////// AND DX, CX /////////////////////////
					case 0x0A:
						OP_CODE_2({
							reg->DX = FlagOperation::AND(Mem, reg, reg->DX, reg->CX);
						},
						{
							re->string = "AND DX, CX";
						})
					///////////////////////// AND DX, DX /////////////////////////
					case 0x08:
						OP_CODE_2({
							reg->DX = FlagOperation::AND(Mem, reg, reg->DX, reg->DX);
						},
						{
							re->string = "AND DX, DX";
						})
				}
				break;
		}
	};

	//////////////////////////////////////////////////
	//		AND AL, IMM8   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x24){
		BYTE byte = GetByteByIP(Mem, CS, IP);
		OP_CODE_2({
			reg->SetAL(FlagOperation::AND(Mem, reg, reg->GetAL(), byte));
		},
		{
			re->string = "AND AL, " + ByteToHexStr(byte);
		})
	};

	//////////////////////////////////////////////////
	//		AND AX, IMM16   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x25){
		BYTE low = GetByteByIP(Mem, CS, IP);
		BYTE high = GetByteByIP(Mem, CS, IP);
		WORD imm = 0;
		ByteSetToWord(&imm, low, high);
		OP_CODE_3({
			reg->AX = FlagOperation::AND(Mem, reg, reg->AX, imm);
		},
		{
			re->string = "AND AX, " + WordToHexStr(imm);
		})
	};

	//////////////////////////////////////////////////
	//		SUB [BX], AX~DX   
	//		SUB [BX+IMM8], AX~DX  
	//		SUB [BX+IMM16], AX~DX  
	//		SUB [BX+SI/DI], AX~DX   
	//		SUB [BX+SI/DI+IMM8], AX~DX  
	//		SUB [BX+SI/DI+IMM16], AX~DX  
	//////////////////////////////////////////////////
	BindOpCodeCall(0x29){
		BYTE byte = GetByteByIP(Mem, CS, IP);
		WORD word = 0;


		/************************ SUB [BX], AX~DX ************************/
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX), *VMtoRM(Mem, reg->DS, reg->BX+1));
		switch(byte)
		{
			///////////////////////// SUB [BX], AX /////////////////////////
			case 0x07:
				OP_CODE_2({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->AX), VMtoRM(Mem, reg->DS, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+1));
				}, 
				{
					re->string = "SUB [BX], AX";
				})
			///////////////////////// SUB [BX], BX /////////////////////////
			case 0x1F:
				OP_CODE_2({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->BX), VMtoRM(Mem, reg->DS, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+1));
				}, 
				{
					re->string = "SUB [BX], BX";
				})
			///////////////////////// SUB [BX], CX /////////////////////////
			case 0x0F:
				OP_CODE_2({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->CX), VMtoRM(Mem, reg->DS, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+1));
				}, 
				{
					re->string = "SUB [BX], CX";
				})
			///////////////////////// SUB [BX], DX /////////////////////////
			case 0x17:
				OP_CODE_2({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->DX), VMtoRM(Mem, reg->DS, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+1));
				}, 
				{
					re->string = "SUB [BX], DX";
				})
		}
			


		/************************ SUB [BX+SI], AX~DX ************************/
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->SI), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+1));
		switch(byte)
		{
			///////////////////////// SUB [BX+SI], AX /////////////////////////
			case 0x00:
				OP_CODE_2({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->AX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+1));	
				},
				{
					re->string = "SUB [BX+SI], AX";
				})
			///////////////////////// SUB [BX+SI], BX /////////////////////////
			case 0x18:
				OP_CODE_2({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+1));	
				},
				{
					re->string = "SUB [BX+SI], BX";
				})
			///////////////////////// SUB [BX+SI], CX /////////////////////////
			case 0x08:
				OP_CODE_2({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->CX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+1));	
				},
				{
					re->string = "SUB [BX+SI], CX";
				})
			///////////////////////// SUB [BX+SI], DX /////////////////////////
			case 0x10:
				OP_CODE_2({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->DX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+1));	
				},
				{
					re->string = "SUB [BX+SI], DX";
				})
		}
		


		/************************ SUB [BX+DI], AX~DX ************************/
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->DI), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+1));
		switch(byte)
		{
			///////////////////////// SUB [BX+DI], AX /////////////////////////
			case 0x01:
				OP_CODE_2({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->AX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+1));	
				},
				{
					re->string = "SUB [BX+DI], AX";
				})
			///////////////////////// SUB [BX+DI], BX /////////////////////////
			case 0x19:
				OP_CODE_2({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+1));	
				},
				{
					re->string = "SUB [BX+DI], BX";
				})
			///////////////////////// SUB [BX+DI], CX /////////////////////////
			case 0x09:
				OP_CODE_2({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->CX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+1));	
				},
				{
					re->string = "SUB [BX+DI], CX";
				})
			///////////////////////// SUB [BX+DI], DX /////////////////////////
			case 0x11:
				OP_CODE_2({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->DX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+1));	
				},
				{
					re->string = "SUB [BX+DI], DX";
				})
		}
		


		BYTE low = GetByteByIP(Mem, CS, IP);
		/************************ SUB [BX+IMM8], AX~DX ************************/
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+low), *VMtoRM(Mem, reg->DS, reg->BX+low+1));
		switch(byte)
		{
			///////////////////////// SUB [BX+IMM8], AX /////////////////////////
			case 0x47:
				OP_CODE_3({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->AX), VMtoRM(Mem, reg->DS, reg->BX+low), VMtoRM(Mem, reg->DS, reg->BX+low+1));
				}, 
				{
					re->string = "SUB [BX+" + ByteToHexStr(low) +"], AX";
				})
			///////////////////////// SUB [BX+IMM8], BX /////////////////////////
			case 0x5F:
				OP_CODE_3({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+low), VMtoRM(Mem, reg->DS, reg->BX+low+1));
				}, 
				{
					re->string = "SUB [BX+" + ByteToHexStr(low) +"], BX";
				})
			///////////////////////// SUB [BX+IMM8], CX /////////////////////////
			case 0x4F:
				OP_CODE_3({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->CX), VMtoRM(Mem, reg->DS, reg->BX+low), VMtoRM(Mem, reg->DS, reg->BX+low+1));
				}, 
				{
					re->string = "SUB [BX+" + ByteToHexStr(low) +"], CX";
				})
			///////////////////////// SUB [BX+IMM8], DX /////////////////////////
			case 0x57:
				OP_CODE_3({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->DX), VMtoRM(Mem, reg->DS, reg->BX+low), VMtoRM(Mem, reg->DS, reg->BX+low+1));
				}, 
				{
					re->string = "SUB [BX+" + ByteToHexStr(low) +"], DX";
				})
		}
		


		/************************ SUB [BX+SI+IMM8], AX~DX ************************/
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low+1));
		switch(byte)
		{
			///////////////////////// SUB [BX+SI+IMM8], AX /////////////////////////
			case 0x40:
				OP_CODE_3({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->AX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low+1));	
				},
				{
					re->string = "SUB [BX+SI+" + ByteToHexStr(low) +"], AX";
				})
			///////////////////////// SUB [BX+SI+IMM8], BX /////////////////////////
			case 0x58:
				OP_CODE_3({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low+1));	
				},
				{
					re->string = "SUB [BX+SI+" + ByteToHexStr(low) +"], BX";
				})
			///////////////////////// SUB [BX+SI+IMM8], CX /////////////////////////
			case 0x48:
				OP_CODE_3({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->CX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low+1));	
				},
				{
					re->string = "SUB [BX+SI+" + ByteToHexStr(low) +"], CX";
				})
			///////////////////////// SUB [BX+SI+IMM8], DX /////////////////////////
			case 0x50:
				OP_CODE_3({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->DX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low+1));	
				},
				{
					re->string = "SUB [BX+SI+" + ByteToHexStr(low) +"], DX";
				})
		}
		


		/************************ SUB [BX+DI+IMM8], AX~DX ************************/
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low+1));
		switch(byte)
		{
			///////////////////////// SUB [BX+DI+IMM8], AX /////////////////////////
			case 0x41:
				OP_CODE_3({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->AX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low+1));	
				},
				{
					re->string = "SUB [BX+DI+" + ByteToHexStr(low) +"], AX";
				})
			///////////////////////// SUB [BX+DI+IMM8], BX /////////////////////////
			case 0x59:
				OP_CODE_3({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low+1));	
				},
				{
					re->string = "SUB [BX+DI+" + ByteToHexStr(low) +"], BX";
				})
			///////////////////////// SUB [BX+DI+IMM8], CX /////////////////////////
			case 0x49:
				OP_CODE_3({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->CX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low+1));	
				},
				{
					re->string = "SUB [BX+DI+" + ByteToHexStr(low) +"], CX";
				})
			///////////////////////// SUB [BX+DI+IMM8], DX /////////////////////////
			case 0x51:
				OP_CODE_3({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->DX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low+1));	
				},
				{
					re->string = "SUB [BX+DI+" + ByteToHexStr(low) +"], DX";
				})
		}
	
		

		BYTE high = GetByteByIP(Mem, CS, IP);
		WORD offset;
		ByteSetToWord(&offset, low, high);
		/************************ SUB [BX+IMM16], AX~DX ************************/
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+offset), *VMtoRM(Mem, reg->DS, reg->BX+offset+1)); // ȡ[BX+IMM16]
		switch(byte)
		{
			///////////////////////// SUB [BX+IMM16], AX /////////////////////////
			case 0x87:
				OP_CODE_4({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->AX), VMtoRM(Mem, reg->DS, reg->BX+offset), VMtoRM(Mem, reg->DS, reg->BX+offset+1));
				}, 
				{
					re->string = "SUB [BX+" + WordToHexStr(offset) +"], AX";
				})
			///////////////////////// SUB [BX+IMM16], BX /////////////////////////
			case 0x9F:
				OP_CODE_4({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+offset), VMtoRM(Mem, reg->DS, reg->BX+offset+1));
				}, 
				{
					re->string = "SUB [BX+" + WordToHexStr(offset) +"], BX";
				})
			///////////////////////// SUB [BX+IMM16], CX /////////////////////////
			case 0x8F:
				OP_CODE_4({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->CX), VMtoRM(Mem, reg->DS, reg->BX+offset), VMtoRM(Mem, reg->DS, reg->BX+offset+1));
				}, 
				{
					re->string = "SUB [BX+" + WordToHexStr(offset) +"], CX";
				})
			///////////////////////// SUB [BX+IMM16], DX /////////////////////////
			case 0x97:
				OP_CODE_4({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->DX), VMtoRM(Mem, reg->DS, reg->BX+offset), VMtoRM(Mem, reg->DS, reg->BX+offset+1));
				}, 
				{
					re->string = "SUB [BX+" + WordToHexStr(offset) +"], DX";
				})
		}
			


		/************************ SUB [BX+SI+IMM16], AX~DX ************************/
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset+1)); // ȡ[BX+SI+IMM16]
		switch(byte)
		{
			///////////////////////// SUB [BX+SI+IMM16], AX /////////////////////////
			case 0x80:
				OP_CODE_4({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->AX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset+1));	
				},
				{
					re->string = "SUB [BX+SI+" + WordToHexStr(offset) +"], AX";
				})
			///////////////////////// SUB [BX+SI+IMM16], BX /////////////////////////
			case 0x98:
				OP_CODE_4({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset+1));	
				},
				{
					re->string = "SUB [BX+SI+" + WordToHexStr(offset) +"], BX";
				})
			///////////////////////// SUB [BX+SI+IMM16], CX /////////////////////////
			case 0x88:
				OP_CODE_4({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->CX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset+1));	
				},
				{
					re->string = "SUB [BX+SI+" + WordToHexStr(offset) +"], CX";
				})
			///////////////////////// SUB [BX+SI+IMM16], DX /////////////////////////
			case 0x90:
				OP_CODE_4({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->DX), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset), VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset+1));	
				},
				{
					re->string = "SUB [BX+SI+" + WordToHexStr(offset) +"], DX";
				})
		}
		


		/************************ SUB [BX+DI+IMM16], AX~DX ************************/
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset+1)); // ȡ[BX+DI+IMM16]
		switch(byte)
		{
			///////////////////////// SUB [BX+DI+IMM16], AX /////////////////////////
			case 0x81:
				OP_CODE_4({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->AX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset+1));	
				},
				{
					re->string = "SUB [BX+DI+" + WordToHexStr(offset) +"], AX";
				})
			///////////////////////// SUB [BX+DI+IMM16], BX /////////////////////////
			case 0x99:
				OP_CODE_4({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->BX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset+1));	
				},
				{
					re->string = "SUB [BX+DI+" + WordToHexStr(offset) +"], BX";
				})
			///////////////////////// SUB [BX+DI+IMM16], CX /////////////////////////
			case 0x89:
				OP_CODE_4({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->CX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset+1));	
				},
				{
					re->string = "SUB [BX+DI+" + WordToHexStr(offset) +"], CX";
				})
			///////////////////////// SUB [BX+DI+IMM16], DX /////////////////////////
			case 0x91:
				OP_CODE_4({
					WordSetToByte(FlagOperation::SUB(Mem, reg, word, reg->DX), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset), VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset+1));	
				},
				{
					re->string = "SUB [BX+DI+" + WordToHexStr(offset) +"], DX";
				})
		}
	};

	//////////////////////////////////////////////////
	//		SUB AL~DL\AH~DH, AL~DL\AH~DH    
	//		SUB AL~DL\AH~DH, [BX]   
	//		SUB AL~DL\AH~DH, [BX+IMM8] 
	//		SUB AL~DL\AH~DH, [BX+IMM16]  
	//		SUB AL~DL\AH~DH, [BX+SI/DI]   
	//		SUB AL~DL\AH~DH, [IMM16]  
	//		SUB AL~DL\AH~DH, [BX+IMM8+SI/DI] 
	//		SUB AL~DL\AH~DH, [BX+IMM16+SI/DI]  
	//////////////////////////////////////////////////
	BindOpCodeCall(0x2A){
		BYTE byte = GetByteByIP(Mem, CS, IP);



		/************************ SUB AL~DL\AH~DH, AL~DL\AH~DH ************************/
		BYTE high = GetByteHigh(byte);
		BYTE low = GetByteLow(byte);
		BYTE OpNum_2 = 0;
		std::string strOpNum_2 = "??";
		// 低位决定第二个操作数
		if (low >= 0x08) low = low - 0x08;
		switch(low)
		{
			case 0X00:
				OpNum_2 = reg->GetAL();
				strOpNum_2 = "AL";
				break;
			case 0X03:
				OpNum_2 = reg->GetBL();
				strOpNum_2 = "BL";
				break;
			case 0X01:
				OpNum_2 = reg->GetCL();
				strOpNum_2 = "CL";
				break;
			case 0X02:
				OpNum_2 = reg->GetDL();
				strOpNum_2 = "DL";
				break;
			case 0X04:
				OpNum_2 = reg->GetAH();
				strOpNum_2 = "AH";
				break;
			case 0X07:
				OpNum_2 = reg->GetBH();
				strOpNum_2 = "BH";
				break;
			case 0X05:
				OpNum_2 = reg->GetCH();
				strOpNum_2 = "CH";
				break;
			case 0X06:
				OpNum_2 = reg->GetDH();
				strOpNum_2 = "DH";
				break;
		}
		// 高位和低位的低位的第4位决定第一个操作数
		high = high + (low&0x08);
		switch(high)
		{
			case 0x0C:
				OP_CODE_2({						
					reg->SetAL(FlagOperation::SUB(Mem, reg, reg->GetAL(), OpNum_2));
				},
				{
					re->string = "SUB AL, " + strOpNum_2;
				})
			case 0x0D:
				OP_CODE_2({						
					reg->SetBL(FlagOperation::SUB(Mem, reg, reg->GetBL(), OpNum_2));
				},
				{
					re->string = "SUB BL, " + strOpNum_2;
				})
			case 0x0E:
				OP_CODE_2({						
					reg->SetAH(FlagOperation::SUB(Mem, reg, reg->GetAH(), OpNum_2));
				},
				{
					re->string = "SUB AH, " + strOpNum_2;
				})
			case 0x0F:
				OP_CODE_2({						
					reg->SetBH(FlagOperation::SUB(Mem, reg, reg->GetBH(), OpNum_2));
				},
				{
					re->string = "SUB BH, " + strOpNum_2;
				})
			case 0x14:
				OP_CODE_2({						
					reg->SetCL(FlagOperation::SUB(Mem, reg, reg->GetCL(), OpNum_2));
				},
				{
					re->string = "SUB CL, " + strOpNum_2;
				})
			case 0x15:
				OP_CODE_2({						
					reg->SetDL(FlagOperation::SUB(Mem, reg, reg->GetDL(), OpNum_2));
				},
				{
					re->string = "SUB DL, " + strOpNum_2;
				})
			case 0x16:
				OP_CODE_2({						
					reg->SetCH(FlagOperation::SUB(Mem, reg, reg->GetCH(), OpNum_2));
				},
				{
					re->string = "SUB CH, " + strOpNum_2;
				})
			case 0x17:
				OP_CODE_2({						
					reg->SetDH(FlagOperation::SUB(Mem, reg, reg->GetDH(), OpNum_2));
				},
				{
					re->string = "SUB DH, " + strOpNum_2;
				})
		}



		/************************ SUB AL~DL, [BX] ************************/
		switch(byte)
		{
			///////////////////////// SUB AL, [BX] /////////////////////////
			case 0x07:
				OP_CODE_2({				
					reg->SetAL(FlagOperation::SUB(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, reg->BX)));
				},
				{
					re->string = "SUB AL, [BX]";
				})
			///////////////////////// SUB BL, [BX] /////////////////////////
			case 0x1F:
				OP_CODE_2({
					reg->SetBL(FlagOperation::SUB(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, reg->BX)));
				},
				{
					re->string = "SUB BL, [BX]";
				})
			///////////////////////// SUB CL, [BX] /////////////////////////
			case 0x0F:
				OP_CODE_2({
					reg->SetCL(FlagOperation::SUB(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, reg->BX)));
				},
				{
					re->string = "SUB CL, [BX]";
				})
			///////////////////////// SUB DL, [BX] /////////////////////////
			case 0x17:
				OP_CODE_2({
					reg->SetDL(FlagOperation::SUB(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, reg->BX)));
				},
				{
					re->string = "SUB DL, [BX]";
				})
		}
		/************************ SUB AH~DH, [BX] ************************/
		switch(byte)
		{
			///////////////////////// SUB AH, [BX] /////////////////////////
			case 0x27:
				OP_CODE_2({
					reg->SetAH(FlagOperation::SUB(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, reg->BX)));
				},
				{
					re->string = "SUB AH, [BX]";
				})
			///////////////////////// SUB BH, [BX] /////////////////////////
			case 0x3F:
				OP_CODE_2({
					reg->SetBH(FlagOperation::SUB(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, reg->BX)));
				},
				{
					re->string = "SUB BH, [BX]";
				})
			///////////////////////// SUB CH, [BX] /////////////////////////
			case 0x2F:
				OP_CODE_2({
					reg->SetCH(FlagOperation::SUB(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, reg->BX)));
				},
				{
					re->string = "SUB CH, [BX]";
				})
			///////////////////////// SUB DH, [BX] /////////////////////////
			case 0x37:
				OP_CODE_2({
					reg->SetDH(FlagOperation::SUB(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, reg->BX)));
				},
				{
					re->string = "SUB DH, [BX]";
				})
		}
		


		/************************ SUB AL~DL, [BX+SI] ************************/
		switch(byte)
		{
			///////////////////////// SUB AL, [BX+SI] /////////////////////////
			case 0x00:
				OP_CODE_2({
					reg->SetAL(FlagOperation::SUB(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI)));
				},
				{
					re->string = "SUB AL, [BX+SI]";
				})
			///////////////////////// SUB BL, [BX+SI] /////////////////////////
			case 0x18:
				OP_CODE_2({
					reg->SetBL(FlagOperation::SUB(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI)));
				},
				{
					re->string = "SUB BL, [BX+SI]";
				})
			///////////////////////// SUB CL, [BX+SI] /////////////////////////
			case 0x08:
				OP_CODE_2({
					reg->SetCL(FlagOperation::SUB(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI)));
				},
				{
					re->string = "SUB CL, [BX+SI]";
				})
			///////////////////////// SUB DL, [BX] /////////////////////////
			case 0x10:
				OP_CODE_2({
					reg->SetDL(FlagOperation::SUB(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI)));
				},
				{
					re->string = "SUB DL, [BX+SI]";
				})
		}
		/************************ SUB AH~DH, [BX+SI] ************************/
		switch(byte)
		{
			///////////////////////// SUB AH, [BX+SI] /////////////////////////
			case 0x20:
				OP_CODE_2({
					reg->SetAH(FlagOperation::SUB(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI)));
				},
				{
					re->string = "SUB AH, [BX+SI]";
				})
			///////////////////////// SUB BH, [BX+SI] /////////////////////////
			case 0x38:
				OP_CODE_2({
					reg->SetBH(FlagOperation::SUB(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI)));
				},
				{
					re->string = "SUB BH, [BX+SI]";
				})
			///////////////////////// SUB CH, [BX+SI] /////////////////////////
			case 0x28:
				OP_CODE_2({
					reg->SetCH(FlagOperation::SUB(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI)));
				},
				{
					re->string = "SUB CH, [BX+SI]";
				})
			///////////////////////// SUB DH, [BX] /////////////////////////
			case 0x30:
				OP_CODE_2({
					reg->SetDH(FlagOperation::SUB(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI)));
				},
				{
					re->string = "SUB DH, [BX+SI]";
				})
		}
				


		/************************ SUB AL~DL, [BX+DI] ************************/
		switch(byte)
		{
			///////////////////////// SUB AL, [BX+DI] /////////////////////////
			case 0x01:
				OP_CODE_2({
					reg->SetAL(FlagOperation::SUB(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI)));
				},
				{
					re->string = "SUB AL, [BX+DI]";
				})
			///////////////////////// SUB BL, [BX+DI] /////////////////////////
			case 0x19:
				OP_CODE_2({
					reg->SetBL(FlagOperation::SUB(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI)));
				},
				{
					re->string = "SUB BL, [BX+DI]";
				})
			///////////////////////// SUB CL, [BX+DI] /////////////////////////
			case 0x09:
				OP_CODE_2({
					reg->SetCL(FlagOperation::SUB(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI)));
				},
				{
					re->string = "SUB CL, [BX+DI]";
				})
			///////////////////////// SUB DL, [BX] /////////////////////////
			case 0x11:
				OP_CODE_2({
					reg->SetDL(FlagOperation::SUB(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI)));
				},
				{
					re->string = "SUB DL, [BX+DI]";
				})
		}
		/************************ SUB AH~DH, [BX+DI] ************************/
		switch(byte)
		{
			///////////////////////// SUB AH, [BX+DI] /////////////////////////
			case 0x21:
				OP_CODE_2({
					reg->SetAH(FlagOperation::SUB(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI)));
				},
				{
					re->string = "SUB AH, [BX+DI]";
				})
			///////////////////////// SUB BH, [BX+DI] /////////////////////////
			case 0x39:
				OP_CODE_2({
					reg->SetBH(FlagOperation::SUB(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI)));
				},
				{
					re->string = "SUB BH, [BX+DI]";
				})
			///////////////////////// SUB CH, [BX+DI] /////////////////////////
			case 0x29:
				OP_CODE_2({
					reg->SetCH(FlagOperation::SUB(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI)));
				},
				{
					re->string = "SUB CH, [BX+DI]";
				})
			///////////////////////// SUB DH, [BX] /////////////////////////
			case 0x31:
				OP_CODE_2({
					reg->SetDH(FlagOperation::SUB(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI)));
				},
				{
					re->string = "SUB DH, [BX+DI]";
				})
		}


		
		low = GetByteByIP(Mem, CS, IP);
		/************************ SUB AL~DL, [BX+IMM8] ************************/
		switch(byte)
		{
			///////////////////////// SUB AL, [BX+IMM8] /////////////////////////
			case 0x47:
				OP_CODE_3({
					reg->SetAL(FlagOperation::SUB(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, reg->BX+low)));
				},
				{
					re->string = "SUB AL, [BX+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB BL, [BX+IMM8] /////////////////////////
			case 0x5F:
				OP_CODE_3({
					reg->SetBL(FlagOperation::SUB(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, reg->BX+low)));
				},
				{
					re->string = "SUB BL, [BX+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB CL, [BX+IMM8] /////////////////////////
			case 0x4F:
				OP_CODE_3({
					reg->SetCL(FlagOperation::SUB(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, reg->BX+low)));
				},
				{
					re->string = "SUB CL, [BX+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB DL, [BX+IMM8] /////////////////////////
			case 0x57:
				OP_CODE_3({
					reg->SetDL(FlagOperation::SUB(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, reg->BX+low)));
				},
				{
					re->string = "SUB DL, [BX+"+ByteToHexStr(low)+"]";
				})
		}
		/************************ SUB AH~DH, [BX+IMM8] ************************/
		switch(byte)
		{
			///////////////////////// SUB AH, [BX+IMM8] /////////////////////////
			case 0x67:
				OP_CODE_3({
					reg->SetAH(FlagOperation::SUB(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, reg->BX+low)));
				},
				{
					re->string = "SUB AH, [BX+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB BH, [BX+IMM8] /////////////////////////
			case 0x7F:
				OP_CODE_3({
					reg->SetBH(FlagOperation::SUB(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, reg->BX+low)));
				},
				{
					re->string = "SUB BH, [BX+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB CH, [BX+IMM8] /////////////////////////
			case 0x6F:
				OP_CODE_3({
					reg->SetCH(FlagOperation::SUB(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, reg->BX+low)));
				},
				{
					re->string = "SUB CH, [BX+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB DH, [BX+IMM8] /////////////////////////
			case 0x77:
				OP_CODE_3({
					reg->SetDH(FlagOperation::SUB(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, reg->BX+low)));
				},
				{
					re->string = "SUB DH, [BX+"+ByteToHexStr(low)+"]";
				})
		}
		
	

		/************************ SUB AL~DL, [BX+SI+IMM8] ************************/
		switch(byte)
		{
			///////////////////////// SUB AL, [BX+SI+IMM8] /////////////////////////
			case 0x40:
				OP_CODE_3({
					reg->SetAL(FlagOperation::SUB(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low)));
				},
				{
					re->string = "SUB AL, [BX+SI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB BL, [BX+SI+IMM8] /////////////////////////
			case 0x58:
				OP_CODE_3({
					reg->SetBL(FlagOperation::SUB(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low)));
				},
				{
					re->string = "SUB BL, [BX+SI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB CL, [BX+SI+IMM8] /////////////////////////
			case 0x48:
				OP_CODE_3({
					reg->SetCL(FlagOperation::SUB(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low)));
				},
				{
					re->string = "SUB CL, [BX+SI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB DL, [BX+SI+IMM8] /////////////////////////
			case 0x50:
				OP_CODE_3({
					reg->SetDL(FlagOperation::SUB(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low)));
				},
				{
					re->string = "SUB DL, [BX+SI+"+ByteToHexStr(low)+"]";
				})
		}
		/************************ SUB AH~DH, [BX+SI+IMM8] ************************/
		switch(byte)
		{
			///////////////////////// SUB AH, [BX+SI+IMM8] /////////////////////////
			case 0x60:
				OP_CODE_3({
					reg->SetAH(FlagOperation::SUB(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low)));
				},
				{
					re->string = "SUB AH, [BX+SI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB BH, [BX+SI+IMM8] /////////////////////////
			case 0x78:
				OP_CODE_3({
					reg->SetBH(FlagOperation::SUB(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low)));
				},
				{
					re->string = "SUB BH, [BX+SI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB CH, [BX+SI+IMM8] /////////////////////////
			case 0x68:
				OP_CODE_3({
					reg->SetCH(FlagOperation::SUB(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low)));
				},
				{
					re->string = "SUB CH, [BX+SI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB DH, [BX+SI+IMM8] /////////////////////////
			case 0x70:
				OP_CODE_3({
					reg->SetDH(FlagOperation::SUB(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low)));
				},
				{
					re->string = "SUB DH, [BX+SI+"+ByteToHexStr(low)+"]";
				})
		}
		
		

		/************************ SUB AL~DL, [BX+DI+IMM8] ************************/
		switch(byte)
		{
			///////////////////////// SUB AL, [BX+DI+IMM8] /////////////////////////
			case 0x41:
				OP_CODE_3({
					reg->SetAL(FlagOperation::SUB(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low)));
				},
				{
					re->string = "SUB AL, [BX+DI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB BL, [BX+DI+IMM8] /////////////////////////
			case 0x59:
				OP_CODE_3({
					reg->SetBL(FlagOperation::SUB(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low)));
				},
				{
					re->string = "SUB BL, [BX+DI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB CL, [BX+DI+IMM8] /////////////////////////
			case 0x49:
				OP_CODE_3({
					reg->SetCL(FlagOperation::SUB(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low)));
				},
				{
					re->string = "SUB CL, [BX+DI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB DL, [BX+DI+IMM8] /////////////////////////
			case 0x51:
				OP_CODE_3({
					reg->SetDL(FlagOperation::SUB(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low)));
				},
				{
					re->string = "SUB DL, [BX+DI+"+ByteToHexStr(low)+"]";
				})
		}
		/************************ SUB AH~DH, [BX+DI+IMM8] ************************/
		switch(byte)
		{
			///////////////////////// SUB AH, [BX+DI+IMM8] /////////////////////////
			case 0x61:
				OP_CODE_3({
					reg->SetAH(FlagOperation::SUB(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low)));
				},
				{
					re->string = "SUB AH, [BX+DI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB BH, [BX+DI+IMM8] /////////////////////////
			case 0x79:
				OP_CODE_3({
					reg->SetBH(FlagOperation::SUB(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low)));
				},
				{
					re->string = "SUB BH, [BX+DI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB CH, [BX+DI+IMM8] /////////////////////////
			case 0x69:
				OP_CODE_3({
					reg->SetCH(FlagOperation::SUB(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low)));
				},
				{
					re->string = "SUB CH, [BX+DI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB DH, [BX+DI+IMM8] /////////////////////////
			case 0x71:
				OP_CODE_3({
					reg->SetDH(FlagOperation::SUB(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low)));
				},
				{
					re->string = "SUB DH, [BX+DI+"+ByteToHexStr(low)+"]";
				})
		}
		
	

		high = GetByteByIP(Mem, CS, IP);
		WORD offset = 0;
		ByteSetToWord(&offset, low, high);
		/************************ SUB AL~DL, [BX+IMM16] ************************/
		switch(byte)
		{
			///////////////////////// SUB AL, [BX+IMM16] /////////////////////////
			case 0x06:
				OP_CODE_4({
					reg->SetAL(FlagOperation::SUB(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, offset)));
				},
				{
					re->string = "SUB AL, ["+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB BL, [BX+IMM16] /////////////////////////
			case 0x1E:
				OP_CODE_4({
					reg->SetBL(FlagOperation::SUB(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, offset)));
				},
				{
					re->string = "SUB BL, ["+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB CL, [BX+IMM16] /////////////////////////
			case 0x0E:
				OP_CODE_4({
					reg->SetCL(FlagOperation::SUB(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, +offset)));
				},
				{
					re->string = "SUB CL, ["+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB DL, [BX+IMM16] /////////////////////////
			case 0x16:
				OP_CODE_4({
					reg->SetDL(FlagOperation::SUB(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, offset)));
				},
				{
					re->string = "SUB DL, ["+WordToHexStr(offset)+"]";
				})
		}
		/************************ SUB AH~DH, [BX+IMM16] ************************/
		switch(byte)
		{
			///////////////////////// SUB AH, [BX+IMM16] /////////////////////////
			case 0x26:
				OP_CODE_4({
					reg->SetAH(FlagOperation::SUB(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, offset)));
				},
				{
					re->string = "SUB AH, ["+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB BH, [BX+IMM16] /////////////////////////
			case 0x3E:
				OP_CODE_4({
					reg->SetBH(FlagOperation::SUB(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, offset)));
				},
				{
					re->string = "SUB BH, ["+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB CH, [BX+IMM16] /////////////////////////
			case 0x2E:
				OP_CODE_4({
					reg->SetCH(FlagOperation::SUB(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, offset)));
				},
				{
					re->string = "SUB CH, ["+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB DH, [BX+IMM16] /////////////////////////
			case 0x36:
				OP_CODE_4({
					reg->SetDH(FlagOperation::SUB(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, offset)));
				},
				{
					re->string = "SUB DH, ["+WordToHexStr(offset)+"]";
				})
		}

		/************************ SUB AL~DL, [BX+IMM16] ************************/
		switch(byte)
		{
			///////////////////////// SUB AL, [BX+IMM16] /////////////////////////
			case 0x87:
				OP_CODE_4({
					reg->SetAL(FlagOperation::SUB(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, reg->BX+offset)));
				},
				{
					re->string = "SUB AL, [BX+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB BL, [BX+IMM16] /////////////////////////
			case 0x9F:
				OP_CODE_4({
					reg->SetBL(FlagOperation::SUB(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, reg->BX+offset)));
				},
				{
					re->string = "SUB BL, [BX+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB CL, [BX+IMM16] /////////////////////////
			case 0x8F:
				OP_CODE_4({
					reg->SetCL(FlagOperation::SUB(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, reg->BX+offset)));
				},
				{
					re->string = "SUB CL, [BX+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB DL, [BX+IMM16] /////////////////////////
			case 0x97:
				OP_CODE_4({
					reg->SetDL(FlagOperation::SUB(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, reg->BX+offset)));
				},
				{
					re->string = "SUB DL, [BX+"+WordToHexStr(offset)+"]";
				})
		}
		/************************ SUB AH~DH, [BX+IMM16] ************************/
		switch(byte)
		{
			///////////////////////// SUB AH, [BX+IMM16] /////////////////////////
			case 0xA7:
				OP_CODE_4({
					reg->SetAH(FlagOperation::SUB(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, reg->BX+offset)));
				},
				{
					re->string = "SUB AH, [BX+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB BH, [BX+IMM16] /////////////////////////
			case 0xBF:
				OP_CODE_4({
					reg->SetBH(FlagOperation::SUB(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, reg->BX+offset)));
				},
				{
					re->string = "SUB BH, [BX+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB CH, [BX+IMM16] /////////////////////////
			case 0xAF:
				OP_CODE_4({
					reg->SetCH(FlagOperation::SUB(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, reg->BX+offset)));
				},
				{
					re->string = "SUB CH, [BX+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB DH, [BX+IMM16] /////////////////////////
			case 0xB7:
				OP_CODE_4({
					reg->SetDH(FlagOperation::SUB(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, reg->BX+offset)));
				},
				{
					re->string = "SUB DH, [BX+"+WordToHexStr(offset)+"]";
				})
		}
		
		

		/************************ SUB AL~DL, [BX+SI+IMM16] ************************/
		switch(byte)
		{
			///////////////////////// SUB AL, [BX+SI+IMM16] /////////////////////////
			case 0x80:
				OP_CODE_4({
					reg->SetAL(FlagOperation::SUB(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset)));
				},
				{
					re->string = "SUB AL, [BX+SI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB BL, [BX+SI+IMM16] /////////////////////////
			case 0x98:
				OP_CODE_4({
					reg->SetBL(FlagOperation::SUB(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset)));
				},
				{
					re->string = "SUB BL, [BX+SI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB CL, [BX+SI+IMM16] /////////////////////////
			case 0x88:
				OP_CODE_4({
					reg->SetCL(FlagOperation::SUB(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset)));
				},
				{
					re->string = "SUB CL, [BX+SI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB DL, [BX+SI+IMM16] /////////////////////////
			case 0x90:
				OP_CODE_4({
					reg->SetDL(FlagOperation::SUB(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset)));
				},
				{
					re->string = "SUB DL, [BX+SI+"+WordToHexStr(offset)+"]";
				})
		}
		/************************ SUB AH~DH, [BX+SI+IMM16] ************************/
		switch(byte)
		{
			///////////////////////// SUB AH, [BX+SI+IMM16] /////////////////////////
			case 0xA0:
				OP_CODE_4({
					reg->SetAH(FlagOperation::SUB(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset)));
				},
				{
					re->string = "SUB AH, [BX+SI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB BH, [BX+SI+IMM16] /////////////////////////
			case 0xB8:
				OP_CODE_4({
					reg->SetBH(FlagOperation::SUB(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset)));
				},
				{
					re->string = "SUB BH, [BX+SI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB CH, [BX+SI+IMM16] /////////////////////////
			case 0xA8:
				OP_CODE_4({
					reg->SetCH(FlagOperation::SUB(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset)));
				},
				{
					re->string = "SUB CH, [BX+SI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB DH, [BX+SI+IMM16] /////////////////////////
			case 0xB0:
				OP_CODE_4({
					reg->SetDH(FlagOperation::SUB(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset)));
				},
				{
					re->string = "SUB DH, [BX+SI+"+WordToHexStr(offset)+"]";
				})
		}
		
		

		/************************ SUB AL~DL, [BX+DI+IMM16] ************************/
		switch(byte)
		{
			///////////////////////// SUB AL, [BX+DI+IMM16] /////////////////////////
			case 0x81:
				OP_CODE_4({
					reg->SetAL(FlagOperation::SUB(Mem, reg, reg->GetAL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset)));
				},
				{
					re->string = "SUB AL, [BX+DI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB BL, [BX+DI+IMM16] /////////////////////////
			case 0x99:
				OP_CODE_4({
					reg->SetBL(FlagOperation::SUB(Mem, reg, reg->GetBL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset)));
				},
				{
					re->string = "SUB BL, [BX+DI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB CL, [BX+DI+IMM16] /////////////////////////
			case 0x89:
				OP_CODE_4({
					reg->SetCL(FlagOperation::SUB(Mem, reg, reg->GetCL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset)));
				},
				{
					re->string = "SUB CL, [BX+DI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB DL, [BX+DI+IMM16] /////////////////////////
			case 0x91:
				OP_CODE_4({
					reg->SetDL(FlagOperation::SUB(Mem, reg, reg->GetDL(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset)));
				},
				{
					re->string = "SUB DL, [BX+DI+"+WordToHexStr(offset)+"]";
				})
		}
		/************************ SUB AH~DH, [BX+DI+IMM16] ************************/
		switch(byte)
		{
			///////////////////////// SUB AH, [BX+DI+IMM16] /////////////////////////
			case 0xA1:
				OP_CODE_4({
					reg->SetAH(FlagOperation::SUB(Mem, reg, reg->GetAH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset)));
				},
				{
					re->string = "SUB AH, [BX+DI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB BH, [BX+DI+IMM16] /////////////////////////
			case 0xB9:
				OP_CODE_4({
					reg->SetBH(FlagOperation::SUB(Mem, reg, reg->GetBH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset)));
				},
				{
					re->string = "SUB BH, [BX+DI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB CH, [BX+DI+IMM16] /////////////////////////
			case 0xA9:
				OP_CODE_4({
					reg->SetCH(FlagOperation::SUB(Mem, reg, reg->GetCH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset)));
				},
				{
					re->string = "SUB CH, [BX+DI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB DH, [BX+DI+IMM16] /////////////////////////
			case 0xB1:
				OP_CODE_4({
					reg->SetDH(FlagOperation::SUB(Mem, reg, reg->GetDH(), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset)));
				},
				{
					re->string = "SUB DH, [BX+DI+"+WordToHexStr(offset)+"]";
				})
		}
		
	};

	//////////////////////////////////////////////////
	//		SUB AX~DX, AX~DX  
	//		SUB AX~DX, [BX]   
	//		SUB AX~DX, [BX+IMM8]   
	//		SUB AX~DX, [BX+IMM16]   
	//		SUB AX~DX, [BX+SI/DI]   
	//		SUB AX~DX, [BX+SI/DI+IMM8]   
	//		SUB AX~DX, [BX+SI/DI+IMM16] 
	//////////////////////////////////////////////////
	BindOpCodeCall(0x2B){
		BYTE byte = GetByteByIP(Mem, CS, IP);		
		BYTE high = GetByteHigh(byte);
		BYTE low = GetByteLow(byte);
		///////////////////////// SUB AX~DX, AX~DX /////////////////////////
		switch(high){
			case 0x0C:
				switch(low){
					///////////////////////// SUB AX, AX /////////////////////////
					case 0x00:	
						OP_CODE_2({
							reg->AX = FlagOperation::SUB(Mem, reg, reg->AX, reg->AX);
						},
						{
							re->string = "SUB AX, AX";
						})
					///////////////////////// SUB AX, BX /////////////////////////
					case 0x03:
						OP_CODE_2({
							reg->AX = FlagOperation::SUB(Mem, reg, reg->AX, reg->BX);
						},
						{
							re->string = "SUB AX, BX";
						})
					///////////////////////// SUB AX, CX /////////////////////////
					case 0x01:
						OP_CODE_2({
							reg->AX = FlagOperation::SUB(Mem, reg, reg->AX, reg->CX);
						},
						{
							re->string = "SUB AX, CX";
						})
					///////////////////////// SUB AX, DX /////////////////////////
					case 0x02:
						OP_CODE_2({
							reg->AX = FlagOperation::SUB(Mem, reg, reg->AX, reg->DX);
						},
						{
							re->string = "SUB AX, DX";
						})

						
					///////////////////////// SUB CX, AX /////////////////////////
					case 0x0B:
						OP_CODE_2({
							reg->CX = FlagOperation::SUB(Mem, reg, reg->CX, reg->AX);
						},
						{
							re->string = "SUB CX, AX";
						})
					///////////////////////// SUB CX, BX /////////////////////////
					case 0x09:
						OP_CODE_2({
							reg->CX = FlagOperation::SUB(Mem, reg, reg->CX, reg->BX);
						},
						{
							re->string = "SUB CX, BX";
						})
					///////////////////////// SUB CX, CX /////////////////////////
					case 0x0A:
						OP_CODE_2({
							reg->CX = FlagOperation::SUB(Mem, reg, reg->CX, reg->CX);
						},
						{
							re->string = "SUB CX, CX";
						})
					///////////////////////// SUB CX, DX /////////////////////////
					case 0x08:
						OP_CODE_2({
							reg->CX = FlagOperation::SUB(Mem, reg, reg->CX, reg->DX);
						},
						{
							re->string = "SUB CX, DX";
						})
				}
				break;

			case 0x0D:
				switch(low){
					///////////////////////// SUB BX, AX /////////////////////////
					case 0x00:	
						OP_CODE_2({
							reg->BX = FlagOperation::SUB(Mem, reg, reg->BX, reg->AX);
						},
						{
							re->string = "SUB BX, AX";
						})
					///////////////////////// SUB BX, BX /////////////////////////
					case 0x03:
						OP_CODE_2({
							reg->BX = FlagOperation::SUB(Mem, reg, reg->BX, reg->BX);
						},
						{
							re->string = "SUB BX, BX";
						})
					///////////////////////// SUB BX, CX /////////////////////////
					case 0x01:
						OP_CODE_2({
							reg->BX = FlagOperation::SUB(Mem, reg, reg->BX, reg->CX);
						},
						{
							re->string = "SUB BX, CX";
						})
					///////////////////////// SUB BX, DX /////////////////////////
					case 0x02:
						OP_CODE_2({
							reg->BX = FlagOperation::SUB(Mem, reg, reg->BX, reg->DX);
						},
						{
							re->string = "SUB BX, DX";
						})

						
					///////////////////////// SUB DX, AX /////////////////////////
					case 0x0B:
						OP_CODE_2({
							reg->DX = FlagOperation::SUB(Mem, reg, reg->DX, reg->AX);
						},
						{
							re->string = "SUB DX, AX";
						})
					///////////////////////// SUB DX, BX /////////////////////////
					case 0x09:
						OP_CODE_2({
							reg->DX = FlagOperation::SUB(Mem, reg, reg->DX, reg->BX);
						},
						{
							re->string = "SUB DX, BX";
						})
					///////////////////////// SUB DX, CX /////////////////////////
					case 0x0A:
						OP_CODE_2({
							reg->DX = FlagOperation::SUB(Mem, reg, reg->DX, reg->CX);
						},
						{
							re->string = "SUB DX, CX";
						})
					///////////////////////// SUB DX, DX /////////////////////////
					case 0x08:
						OP_CODE_2({
							reg->DX = FlagOperation::SUB(Mem, reg, reg->DX, reg->DX);
						},
						{
							re->string = "SUB DX, DX";
						})
				}
				break;
		}

		WORD word = 0;
		///////////////////////// SUB AX~DX, [BX] /////////////////////////
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX), *VMtoRM(Mem, reg->DS, reg->BX+1));
		switch(byte)
		{
			///////////////////////// SUB AX, [BX] /////////////////////////
			case 0x07:
				OP_CODE_2({
					reg->AX = FlagOperation::SUB(Mem, reg, reg->AX, word);
				},
				{
					re->string = "SUB AX, [BX]";
				})
			///////////////////////// SUB BX, [BX] /////////////////////////
			case 0x1F:
				OP_CODE_2({
					reg->BX = FlagOperation::SUB(Mem, reg, reg->BX, word);
				},
				{
					re->string = "SUB AX, [BX]";
				})
			///////////////////////// SUB CX, [BX] /////////////////////////
			case 0x0F:
				OP_CODE_2({
					reg->CX = FlagOperation::SUB(Mem, reg, reg->CX, word);
				},
				{
					re->string = "SUB AX, [BX]";
				})
			///////////////////////// SUB DX, [BX] /////////////////////////
			case 0x17:
				OP_CODE_2({
					reg->DX = FlagOperation::SUB(Mem, reg, reg->DX, word);
				},
				{
					re->string = "SUB AX, [BX]";
				})
		}
	
		///////////////////////// SUB AX~DX, [BX+SI] /////////////////////////
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->SI), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+1));
		switch(byte)
		{
			///////////////////////// SUB AX, [BX+SI] /////////////////////////
			case 0x00:
				OP_CODE_2({
					reg->AX = FlagOperation::SUB(Mem, reg, reg->AX, word);
				},
				{
					re->string = "SUB AX, [BX+SI]";
				})
			///////////////////////// SUB BX, [BX+SI] /////////////////////////
			case 0x18:
				OP_CODE_2({
					reg->BX = FlagOperation::SUB(Mem, reg, reg->BX, word);
				},
				{
					re->string = "SUB AX, [BX+SI]";
				})
			///////////////////////// SUB CX, [BX+SI] /////////////////////////
			case 0x08:
				OP_CODE_2({
					reg->CX = FlagOperation::SUB(Mem, reg, reg->CX, word);
				},
				{
					re->string = "SUB AX, [BX+SI]";
				})
			///////////////////////// SUB DX, [BX+SI] /////////////////////////
			case 0x10:
				OP_CODE_2({
					reg->DX = FlagOperation::SUB(Mem, reg, reg->DX, word);
				},
				{
					re->string = "SUB AX, [BX+SI]";
				})
		}
		
		///////////////////////// SUB AX~DX, [BX+DI] /////////////////////////
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->DI), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+1));
		switch(byte)
		{
			///////////////////////// SUB AX, [BX+DI] /////////////////////////
			case 0x01:
				OP_CODE_2({
					reg->AX = FlagOperation::SUB(Mem, reg, reg->AX, word);
				},
				{
					re->string = "SUB AX, [BX+DI]";
				})
			///////////////////////// SUB BX, [BX+DI] /////////////////////////
			case 0x19:
				OP_CODE_2({
					reg->BX = FlagOperation::SUB(Mem, reg, reg->BX, word);
				},
				{
					re->string = "SUB AX, [BX+DI]";
				})
			///////////////////////// SUB CX, [BX+DI] /////////////////////////
			case 0x09:
				OP_CODE_2({
					reg->CX = FlagOperation::SUB(Mem, reg, reg->CX, word);
				},
				{
					re->string = "SUB AX, [BX+DI]";
				})
			///////////////////////// SUB DX, [BX+DI] /////////////////////////
			case 0x11:
				OP_CODE_2({
					reg->DX = FlagOperation::SUB(Mem, reg, reg->DX, word);
				},
				{
					re->string = "SUB AX, [BX+DI]";
				})
		}

		low = GetByteByIP(Mem, CS, IP);
		///////////////////////// SUB AX~DX, [BX+IMM8] /////////////////////////
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+low), *VMtoRM(Mem, reg->DS, reg->BX+low+1));
		switch(byte)
		{
			///////////////////////// SUB AX, [BX+IMM8] /////////////////////////
			case 0x47:
				OP_CODE_3({
					reg->AX = FlagOperation::SUB(Mem, reg, reg->AX, word);
				},
				{
					re->string = "SUB AX, [BX+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB BX, [BX+IMM8] /////////////////////////
			case 0x5F:
				OP_CODE_3({
					reg->BX = FlagOperation::SUB(Mem, reg, reg->BX, word);
				},
				{
					re->string = "SUB AX, [BX+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB CX, [BX+IMM8] /////////////////////////
			case 0x4F:
				OP_CODE_3({
					reg->CX = FlagOperation::SUB(Mem, reg, reg->CX, word);
				},
				{
					re->string = "SUB AX, [BX+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB DX, [BX+IMM8] /////////////////////////
			case 0x57:
				OP_CODE_3({
					reg->DX = FlagOperation::SUB(Mem, reg, reg->DX, word);
				},
				{
					re->string = "SUB AX, [BX+"+ByteToHexStr(low)+"]";
				})
		}
		
		///////////////////////// SUB AX~DX, [BX+SI+IMM8] /////////////////////////
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+low+1));
		switch(byte)
		{
			///////////////////////// SUB AX, [BX+SI+IMM8] /////////////////////////
			case 0x40:
				OP_CODE_3({
					reg->AX = FlagOperation::SUB(Mem, reg, reg->AX, word);
				},
				{
					re->string = "SUB AX, [BX+SI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB BX, [BX+SI+IMM8] /////////////////////////
			case 0x58:
				OP_CODE_3({
					reg->BX = FlagOperation::SUB(Mem, reg, reg->BX, word);
				},
				{
					re->string = "SUB AX, [BX+SI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB CX, [BX+SI+IMM8] /////////////////////////
			case 0x48:
				OP_CODE_3({
					reg->CX = FlagOperation::SUB(Mem, reg, reg->CX, word);
				},
				{
					re->string = "SUB AX, [BX+SI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB DX, [BX+SI+IMM8] /////////////////////////
			case 0x50:
				OP_CODE_3({
					reg->DX = FlagOperation::SUB(Mem, reg, reg->DX, word);
				},
				{
					re->string = "SUB AX, [BX+SI+"+ByteToHexStr(low)+"]";
				})
		}
		
		///////////////////////// SUB AX~DX, [BX+DI+IMM8] /////////////////////////
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+low+1));
		switch(byte)
		{
			///////////////////////// SUB AX, [BX+DI+IMM8] /////////////////////////
			case 0x41:
				OP_CODE_3({
					reg->AX = FlagOperation::SUB(Mem, reg, reg->AX, word);
				},
				{
					re->string = "SUB AX, [BX+DI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB BX, [BX+DI+IMM8] /////////////////////////
			case 0x59:
				OP_CODE_3({
					reg->BX = FlagOperation::SUB(Mem, reg, reg->BX, word);
				},
				{
					re->string = "SUB AX, [BX+DI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB CX, [BX+DI+IMM8] /////////////////////////
			case 0x49:
				OP_CODE_3({
					reg->CX = FlagOperation::SUB(Mem, reg, reg->CX, word);
				},
				{
					re->string = "SUB AX, [BX+DI+"+ByteToHexStr(low)+"]";
				})
			///////////////////////// SUB DX, [BX+DI+IMM8] /////////////////////////
			case 0x51:
				OP_CODE_3({
					reg->DX = FlagOperation::SUB(Mem, reg, reg->DX, word);
				},
				{
					re->string = "SUB AX, [BX+DI+"+ByteToHexStr(low)+"]";
				})
		}

		high = GetByteByIP(Mem, CS, IP);
		WORD offset;
		ByteSetToWord(&offset, low, high);
		///////////////////////// SUB AX~DX, [BX+IMM16] /////////////////////////
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+offset), *VMtoRM(Mem, reg->DS, reg->BX+offset+1));
		switch(byte)
		{
			///////////////////////// SUB AX, [BX+IMM16] /////////////////////////
			case 0x87:
				OP_CODE_4({
					reg->AX = FlagOperation::SUB(Mem, reg, reg->AX, word);
				},
				{
					re->string = "SUB AX, [BX+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB BX, [BX+IMM16] /////////////////////////
			case 0x9F:
				OP_CODE_4({
					reg->BX = FlagOperation::SUB(Mem, reg, reg->BX, word);
				},
				{
					re->string = "SUB AX, [BX+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB CX, [BX+IMM16] /////////////////////////
			case 0x8F:
				OP_CODE_4({
					reg->CX = FlagOperation::SUB(Mem, reg, reg->CX, word);
				},
				{
					re->string = "SUB AX, [BX+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB DX, [BX+IMM16] /////////////////////////
			case 0x97:
				OP_CODE_4({
					reg->DX = FlagOperation::SUB(Mem, reg, reg->DX, word);
				},
				{
					re->string = "SUB AX, [BX+"+WordToHexStr(offset)+"]";
				})
		}

		///////////////////////// SUB AX~DX, [BX+SI+IMM16] /////////////////////////
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset), *VMtoRM(Mem, reg->DS, reg->BX+reg->SI+offset+1));
		switch(byte)
		{
			///////////////////////// SUB AX, [BX+SI+IMM16] /////////////////////////
			case 0x80:
				OP_CODE_4({
					reg->AX = FlagOperation::SUB(Mem, reg, reg->AX, word);
				},
				{
					re->string = "SUB AX, [BX+SI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB BX, [BX+SI+IMM16] /////////////////////////
			case 0x98:
				OP_CODE_4({
					reg->BX = FlagOperation::SUB(Mem, reg, reg->BX, word);
				},
				{
					re->string = "SUB AX, [BX+SI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB CX, [BX+SI+IMM16] /////////////////////////
			case 0x88:
				OP_CODE_4({
					reg->CX = FlagOperation::SUB(Mem, reg, reg->CX, word);
				},
				{
					re->string = "SUB AX, [BX+SI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB DX, [BX+SI+IMM16] /////////////////////////
			case 0x90:
				OP_CODE_4({
					reg->DX = FlagOperation::SUB(Mem, reg, reg->DX, word);
				},
				{
					re->string = "SUB AX, [BX+SI+"+WordToHexStr(offset)+"]";
				})
		}
		
		///////////////////////// SUB AX~DX, [BX+DI+IMM16] /////////////////////////
		ByteSetToWord(&word, *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset), *VMtoRM(Mem, reg->DS, reg->BX+reg->DI+offset+1));
		switch(byte)
		{
			///////////////////////// SUB AX, [BX+DI+IMM16] /////////////////////////
			case 0x81:
				OP_CODE_4({
					reg->AX = FlagOperation::SUB(Mem, reg, reg->AX, word);
				},
				{
					re->string = "SUB AX, [BX+DI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB BX, [BX+DI+IMM16] /////////////////////////
			case 0x99:
				OP_CODE_4({
					reg->BX = FlagOperation::SUB(Mem, reg, reg->BX, word);
				},
				{
					re->string = "SUB AX, [BX+DI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB CX, [BX+DI+IMM16] /////////////////////////
			case 0x89:
				OP_CODE_4({
					reg->CX = FlagOperation::SUB(Mem, reg, reg->CX, word);
				},
				{
					re->string = "SUB AX, [BX+DI+"+WordToHexStr(offset)+"]";
				})
			///////////////////////// SUB DX, [BX+DI+IMM16] /////////////////////////
			case 0x91:
				OP_CODE_4({
					reg->DX = FlagOperation::SUB(Mem, reg, reg->DX, word);
				},
				{
					re->string = "SUB AX, [BX+DI+"+WordToHexStr(offset)+"]";
				})
		}
	};

	//////////////////////////////////////////////////
	//		SUB AL, IMM8   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x2D){
		BYTE byte = GetByteByIP(Mem, CS, IP);
		
		OP_CODE_2({
			reg->SetAL(FlagOperation::SUB(Mem, reg, reg->GetAL(), byte));
		}, 
		{
			re->string = "SUB AL, " + ByteToHexStr(byte);
		})
	};

	//////////////////////////////////////////////////
	//		SUB AX, IMM16   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x2E){
		BYTE low = GetByteByIP(Mem, CS, IP);
		BYTE high = GetByteByIP(Mem, CS, IP);
		WORD word = 0;
		ByteSetToWord(&word, low, high);
		OP_CODE_3({
			reg->AX = FlagOperation::SUB(Mem, reg, reg->AX, word);
		}, 
		{
			re->string = "SUB AX, " + WordToHexStr(word);
		})
	};

	//////////////////////////////////////////////////
	//		XOR AL~DL\AH~DH, AL~DL\AH~DH   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x32){
		BYTE byte = GetByteByIP(Mem, CS, IP);

		/************************ XOR AL~DL\AH~DH, AL~DL\AH~DH ************************/
		BYTE high = GetByteHigh(byte);
		BYTE low = GetByteLow(byte);
		BYTE OpNum_2 = 0;
		std::string strOpNum_2 = "??";
		// 低位决定第二个操作数
		if (low >= 0x08) low = low - 0x08;
		switch(low)
		{
			case 0X00:
				OpNum_2 = reg->GetAL();
				strOpNum_2 = "AL";
				break;
			case 0X03:
				OpNum_2 = reg->GetBL();
				strOpNum_2 = "BL";
				break;
			case 0X01:
				OpNum_2 = reg->GetCL();
				strOpNum_2 = "CL";
				break;
			case 0X02:
				OpNum_2 = reg->GetDL();
				strOpNum_2 = "DL";
				break;
			case 0X04:
				OpNum_2 = reg->GetAH();
				strOpNum_2 = "AH";
				break;
			case 0X07:
				OpNum_2 = reg->GetBH();
				strOpNum_2 = "BH";
				break;
			case 0X05:
				OpNum_2 = reg->GetCH();
				strOpNum_2 = "CH";
				break;
			case 0X06:
				OpNum_2 = reg->GetDH();
				strOpNum_2 = "DH";
				break;
		}
		// 高位和低位的低位的第4位决定第一个操作数
		high = high + (low&0x08);
		switch(high)
		{
			case 0x0C:
				OP_CODE_2({						
					reg->SetAL(FlagOperation::XOR(Mem, reg, reg->GetAL(), OpNum_2));
				},
				{
					re->string = "XOR AL, " + strOpNum_2;
				})
			case 0x0D:
				OP_CODE_2({						
					reg->SetBL(FlagOperation::XOR(Mem, reg, reg->GetBL(), OpNum_2));
				},
				{
					re->string = "XOR BL, " + strOpNum_2;
				})
			case 0x0E:
				OP_CODE_2({						
					reg->SetAH(FlagOperation::XOR(Mem, reg, reg->GetAH(), OpNum_2));
				},
				{
					re->string = "XOR AH, " + strOpNum_2;
				})
			case 0x0F:
				OP_CODE_2({						
					reg->SetBH(FlagOperation::XOR(Mem, reg, reg->GetBH(), OpNum_2));
				},
				{
					re->string = "XOR BH, " + strOpNum_2;
				})
			case 0x14:
				OP_CODE_2({						
					reg->SetCL(FlagOperation::XOR(Mem, reg, reg->GetCL(), OpNum_2));
				},
				{
					re->string = "XOR CL, " + strOpNum_2;
				})
			case 0x15:
				OP_CODE_2({						
					reg->SetDL(FlagOperation::XOR(Mem, reg, reg->GetDL(), OpNum_2));
				},
				{
					re->string = "XOR DL, " + strOpNum_2;
				})
			case 0x16:
				OP_CODE_2({						
					reg->SetCH(FlagOperation::XOR(Mem, reg, reg->GetCH(), OpNum_2));
				},
				{
					re->string = "XOR CH, " + strOpNum_2;
				})
			case 0x17:
				OP_CODE_2({						
					reg->SetDH(FlagOperation::XOR(Mem, reg, reg->GetDH(), OpNum_2));
				},
				{
					re->string = "XOR DH, " + strOpNum_2;
				})
		}
	};

	//////////////////////////////////////////////////
	//		XOR AX~DX, AX~DX   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x33){
		BYTE byte = GetByteByIP(Mem, CS, IP);		
		BYTE high = GetByteHigh(byte);
		BYTE low = GetByteLow(byte);
		///////////////////////// XOR AX~DX, AX~DX /////////////////////////
		switch(high){
			case 0x0C:
				switch(low){
					///////////////////////// XOR AX, AX /////////////////////////
					case 0x00:	
						OP_CODE_2({
							reg->AX = FlagOperation::XOR(Mem, reg, reg->AX, reg->AX);
						},
						{
							re->string = "XOR AX, AX";
						})
					///////////////////////// XOR AX, BX /////////////////////////
					case 0x03:
						OP_CODE_2({
							reg->AX = FlagOperation::XOR(Mem, reg, reg->AX, reg->BX);
						},
						{
							re->string = "XOR AX, BX";
						})
					///////////////////////// XOR AX, CX /////////////////////////
					case 0x01:
						OP_CODE_2({
							reg->AX = FlagOperation::XOR(Mem, reg, reg->AX, reg->CX);
						},
						{
							re->string = "XOR AX, CX";
						})
					///////////////////////// XOR AX, DX /////////////////////////
					case 0x02:
						OP_CODE_2({
							reg->AX = FlagOperation::XOR(Mem, reg, reg->AX, reg->DX);
						},
						{
							re->string = "XOR AX, DX";
						})

						
					///////////////////////// XOR CX, AX /////////////////////////
					case 0x0B:
						OP_CODE_2({
							reg->CX = FlagOperation::XOR(Mem, reg, reg->CX, reg->AX);
						},
						{
							re->string = "XOR CX, AX";
						})
					///////////////////////// XOR CX, BX /////////////////////////
					case 0x09:
						OP_CODE_2({
							reg->CX = FlagOperation::XOR(Mem, reg, reg->CX, reg->BX);
						},
						{
							re->string = "XOR CX, BX";
						})
					///////////////////////// XOR CX, CX /////////////////////////
					case 0x0A:
						OP_CODE_2({
							reg->CX = FlagOperation::XOR(Mem, reg, reg->CX, reg->CX);
						},
						{
							re->string = "XOR CX, CX";
						})
					///////////////////////// XOR CX, DX /////////////////////////
					case 0x08:
						OP_CODE_2({
							reg->CX = FlagOperation::XOR(Mem, reg, reg->CX, reg->DX);
						},
						{
							re->string = "XOR CX, DX";
						})
				}
				break;

			case 0x0D:
				switch(low){
					///////////////////////// XOR BX, AX /////////////////////////
					case 0x00:	
						OP_CODE_2({
							reg->BX = FlagOperation::XOR(Mem, reg, reg->BX, reg->AX);
						},
						{
							re->string = "XOR BX, AX";
						})
					///////////////////////// XOR BX, BX /////////////////////////
					case 0x03:
						OP_CODE_2({
							reg->BX = FlagOperation::XOR(Mem, reg, reg->BX, reg->BX);
						},
						{
							re->string = "XOR BX, BX";
						})
					///////////////////////// XOR BX, CX /////////////////////////
					case 0x01:
						OP_CODE_2({
							reg->BX = FlagOperation::XOR(Mem, reg, reg->BX, reg->CX);
						},
						{
							re->string = "XOR BX, CX";
						})
					///////////////////////// XOR BX, DX /////////////////////////
					case 0x02:
						OP_CODE_2({
							reg->BX = FlagOperation::XOR(Mem, reg, reg->BX, reg->DX);
						},
						{
							re->string = "XOR BX, DX";
						})

						
					///////////////////////// XOR DX, AX /////////////////////////
					case 0x0B:
						OP_CODE_2({
							reg->DX = FlagOperation::XOR(Mem, reg, reg->DX, reg->AX);
						},
						{
							re->string = "XOR DX, AX";
						})
					///////////////////////// XOR DX, BX /////////////////////////
					case 0x09:
						OP_CODE_2({
							reg->DX = FlagOperation::XOR(Mem, reg, reg->DX, reg->BX);
						},
						{
							re->string = "XOR DX, BX";
						})
					///////////////////////// XOR DX, CX /////////////////////////
					case 0x0A:
						OP_CODE_2({
							reg->DX = FlagOperation::XOR(Mem, reg, reg->DX, reg->CX);
						},
						{
							re->string = "XOR DX, CX";
						})
					///////////////////////// XOR DX, DX /////////////////////////
					case 0x08:
						OP_CODE_2({
							reg->DX = FlagOperation::XOR(Mem, reg, reg->DX, reg->DX);
						},
						{
							re->string = "XOR DX, DX";
						})
				}
				break;
		}
	};

	//////////////////////////////////////////////////
	//		CMP AL~DL\AH~DH, AL~DL\AH~DH   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x3A){
		BYTE byte = GetByteByIP(Mem, CS, IP);

		/************************ CMP AL~DL\AH~DH, AL~DL\AH~DH ************************/
		BYTE high = GetByteHigh(byte);
		BYTE low = GetByteLow(byte);
		BYTE OpNum_2 = 0;
		std::string strOpNum_2 = "??";
		// 低位决定第二个操作数
		if (low >= 0x08) low = low - 0x08;
		switch(low)
		{
			case 0X00:
				OpNum_2 = reg->GetAL();
				strOpNum_2 = "AL";
				break;
			case 0X03:
				OpNum_2 = reg->GetBL();
				strOpNum_2 = "BL";
				break;
			case 0X01:
				OpNum_2 = reg->GetCL();
				strOpNum_2 = "CL";
				break;
			case 0X02:
				OpNum_2 = reg->GetDL();
				strOpNum_2 = "DL";
				break;
			case 0X04:
				OpNum_2 = reg->GetAH();
				strOpNum_2 = "AH";
				break;
			case 0X07:
				OpNum_2 = reg->GetBH();
				strOpNum_2 = "BH";
				break;
			case 0X05:
				OpNum_2 = reg->GetCH();
				strOpNum_2 = "CH";
				break;
			case 0X06:
				OpNum_2 = reg->GetDH();
				strOpNum_2 = "DH";
				break;
		}
		// 高位和低位的低位的第4位决定第一个操作数
		high = high + (low&0x08);
		switch(high)
		{
			case 0x0C:
				OP_CODE_2({						
					FlagOperation::CMP(Mem, reg, reg->GetAL(), OpNum_2);
				},
				{
					re->string = "CMP AL, " + strOpNum_2;
				})
			case 0x0D:
				OP_CODE_2({						
					FlagOperation::CMP(Mem, reg, reg->GetBL(), OpNum_2);
				},
				{
					re->string = "CMP BL, " + strOpNum_2;
				})
			case 0x0E:
				OP_CODE_2({						
					FlagOperation::CMP(Mem, reg, reg->GetAH(), OpNum_2);
				},
				{
					re->string = "CMP AH, " + strOpNum_2;
				})
			case 0x0F:
				OP_CODE_2({						
					FlagOperation::CMP(Mem, reg, reg->GetBH(), OpNum_2);
				},
				{
					re->string = "CMP BH, " + strOpNum_2;
				})
			case 0x14:
				OP_CODE_2({						
					FlagOperation::CMP(Mem, reg, reg->GetCL(), OpNum_2);
				},
				{
					re->string = "CMP CL, " + strOpNum_2;
				})
			case 0x15:
				OP_CODE_2({						
					FlagOperation::CMP(Mem, reg, reg->GetDL(), OpNum_2);
				},
				{
					re->string = "CMP DL, " + strOpNum_2;
				})
			case 0x16:
				OP_CODE_2({						
					FlagOperation::CMP(Mem, reg, reg->GetCH(), OpNum_2);
				},
				{
					re->string = "CMP CH, " + strOpNum_2;
				})
			case 0x17:
				OP_CODE_2({						
					FlagOperation::CMP(Mem, reg, reg->GetDH(), OpNum_2);
				},
				{
					re->string = "CMP DH, " + strOpNum_2;
				})
		}
	};

	//////////////////////////////////////////////////
	//		CMP AX~DX, AX~DX   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x3B){
		BYTE byte = GetByteByIP(Mem, CS, IP);		
		BYTE high = GetByteHigh(byte);
		BYTE low = GetByteLow(byte);
		///////////////////////// CMP AX~DX, AX~DX /////////////////////////
		switch(high){
			case 0x0C:
				switch(low){
					///////////////////////// CMP AX, AX /////////////////////////
					case 0x00:	
						OP_CODE_2({
							FlagOperation::CMP(Mem, reg, reg->AX, reg->AX);
						},
						{
							re->string = "CMP AX, AX";
						})
					///////////////////////// CMP AX, BX /////////////////////////
					case 0x03:
						OP_CODE_2({
							FlagOperation::CMP(Mem, reg, reg->AX, reg->BX);
						},
						{
							re->string = "CMP AX, BX";
						})
					///////////////////////// CMP AX, CX /////////////////////////
					case 0x01:
						OP_CODE_2({
							FlagOperation::CMP(Mem, reg, reg->AX, reg->CX);
						},
						{
							re->string = "CMP AX, CX";
						})
					///////////////////////// CMP AX, DX /////////////////////////
					case 0x02:
						OP_CODE_2({
							FlagOperation::CMP(Mem, reg, reg->AX, reg->DX);
						},
						{
							re->string = "CMP AX, DX";
						})

						
					///////////////////////// CMP CX, AX /////////////////////////
					case 0x0B:
						OP_CODE_2({
							FlagOperation::CMP(Mem, reg, reg->CX, reg->AX);
						},
						{
							re->string = "CMP CX, AX";
						})
					///////////////////////// CMP CX, BX /////////////////////////
					case 0x09:
						OP_CODE_2({
							FlagOperation::CMP(Mem, reg, reg->CX, reg->BX);
						},
						{
							re->string = "CMP CX, BX";
						})
					///////////////////////// CMP CX, CX /////////////////////////
					case 0x0A:
						OP_CODE_2({
							FlagOperation::CMP(Mem, reg, reg->CX, reg->CX);
						},
						{
							re->string = "CMP CX, CX";
						})
					///////////////////////// CMP CX, DX /////////////////////////
					case 0x08:
						OP_CODE_2({
							FlagOperation::CMP(Mem, reg, reg->CX, reg->DX);
						},
						{
							re->string = "CMP CX, DX";
						})
				}
				break;

			case 0x0D:
				switch(low){
					///////////////////////// CMP BX, AX /////////////////////////
					case 0x00:	
						OP_CODE_2({
							FlagOperation::CMP(Mem, reg, reg->BX, reg->AX);
						},
						{
							re->string = "CMP BX, AX";
						})
					///////////////////////// CMP BX, BX /////////////////////////
					case 0x03:
						OP_CODE_2({
							FlagOperation::CMP(Mem, reg, reg->BX, reg->BX);
						},
						{
							re->string = "CMP BX, BX";
						})
					///////////////////////// CMP BX, CX /////////////////////////
					case 0x01:
						OP_CODE_2({
							FlagOperation::CMP(Mem, reg, reg->BX, reg->CX);
						},
						{
							re->string = "CMP BX, CX";
						})
					///////////////////////// CMP BX, DX /////////////////////////
					case 0x02:
						OP_CODE_2({
							FlagOperation::CMP(Mem, reg, reg->BX, reg->DX);
						},
						{
							re->string = "CMP BX, DX";
						})

						
					///////////////////////// CMP DX, AX /////////////////////////
					case 0x0B:
						OP_CODE_2({
							FlagOperation::CMP(Mem, reg, reg->DX, reg->AX);
						},
						{
							re->string = "CMP DX, AX";
						})
					///////////////////////// CMP DX, BX /////////////////////////
					case 0x09:
						OP_CODE_2({
							FlagOperation::CMP(Mem, reg, reg->DX, reg->BX);
						},
						{
							re->string = "CMP DX, BX";
						})
					///////////////////////// CMP DX, CX /////////////////////////
					case 0x0A:
						OP_CODE_2({
							FlagOperation::CMP(Mem, reg, reg->DX, reg->CX);
						},
						{
							re->string = "CMP DX, CX";
						})
					///////////////////////// CMP DX, DX /////////////////////////
					case 0x08:
						OP_CODE_2({
							FlagOperation::CMP(Mem, reg, reg->DX, reg->DX);
						},
						{
							re->string = "CMP DX, DX";
						})
				}
				break;
		}
	};

	//////////////////////////////////////////////////
	//		CMP AL, IMM8   
	//////////////////////////////////////////////////
	BindOpCodeCall(0x3C){
		BYTE IMM8 = GetByteByIP(Mem, CS, IP);
		OP_CODE_2({
			FlagOperation::CMP(Mem, reg, reg->GetAL(), IMM8);
		},
		{
			re->string = "CMP AL, " + ByteToHexStr(IMM8);
		})
	};
}